0
votes

I'm rather new with the silverstripe framework but i have experience with magento which is also in PHP.

I have read several topics about deploying silverstripe. It seems that a lot of users preferred to download a fresh version of silverstripe install it on live server and then transfer the template and mysite folders and do the /dev/build

I guess this can work if you have access to the live server but what if you have a client who just wants his site on USB (mainly for security reasons)? What then?

So my question is this: what is the recommended way of migrating SilverStripe from dev to live server?

Will it work if you just copy paste all the files and the database?

2

2 Answers

0
votes

As long as the live server meets SilverStripe's requirement it will work.

You'll need to ensure you update the database details if they change...

define('SS_DATABASE_SERVER', ''); define('SS_DATABASE_NAME',''); define('SS_DATABASE_USERNAME', ''); define('SS_DATABASE_PASSWORD', '');

...along with the environment type.

define('SS_ENVIRONMENT_TYPE', 'live');

Unlike other systems the IP or URL aren't baked into the database. Although It's advisable to do a /dev/build on the live server

0
votes

The client should know what files on the server should be writeable by the webserver / php (namely assets/ and cache dir) and what not (all the rest imho).

I also recommend to setup all server specific configuration (see Phill's answer) in a file called _ss_environment.php (see docs) which can reside outside the webroot.

Then grab the database dump and setup the site on another server.