Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Uploading site to live server - streamlining and best practice


Go to End


2 Posts   2110 Views

Avatar
Liquid Edge Creative

Community Member, 56 Posts

26 November 2014 at 3:34pm

Hi team,

We're trying to streamline the process of moving sites from our local development environment to the live server and would like some guidelines on best practice and any recommendations on how to speed up the process.
To date we have used the following basic steps for most of our sites:
1. Create fresh install of SilverStripe on live server.
2. Upload theme, assets and code. Update Config to point to new theme. Rebuild database.
3. Upload modules one by one, rebuild database each time.
4. Export local database, import into live site.

We're now experimenting with simpler methods like simply bulk uploading the entire local site, changing the settings in the config file to correspond to the live server, then importing the database, but we constantly get database errors when doing so, usually to do with modules, such as tables not being found, etc.

Please give us some insight into how we can best streamline our transfer process. What technologies can we employ to make this easier? For example, we use Composer to set up sites and add modules locally but I'm not sure how to employ this remotely?

Thanks for your help.

Avatar
camfindlay

Forum Moderator, 267 Posts

27 November 2014 at 4:21pm

something I have use personally is setting up a git remote on the production server which means git is installed on the server, you can then setup what is called a post-receive hook in git to run the composer install command to deal with any dependancies when you push production versions of your project to the server git remote.

Finally you can use a useful command-line tool both locally and on your server called "sspak" which makes assets and the database portable as 1 file.
See https://github.com/silverstripe/sspak

Of course there are many other deployment tools out there and it also depends on the type of server you run, the above is less likely to work on shared hosting (more aimed at a VPS).