Reputation: 765
I have a small test project built with Silverstripe that I have done on my local dev machine and want to deploy it to a server. My problem is how I should handle the database that is on my dev computer.
Does it work to dump the database and import it on the server? Or does Silverstripe store information in the database that can cause problems? When I previously tried this on Wordpress it was complicated since it stored complete urls like "localhost/etc".
Upvotes: 1
Views: 209
Reputation: 4626
You want to move your database and the assets to the server. As Simon Erkelens already stated, this can be done without problems. Everything server specific (like paths, domains etc) is gathered automatically or configured on each server.
SilverStripe also has with a great tool, called sspak, that grabs db and assets and packs it in a tar.gz file. You can upload this to the server and run the tool again to import it there after you configured the database credentials.
You can install it globally or per project using composer.
On windows the remote part doesn't work properly, so I always save the sspak file from my project locally, upload it, and run sspak on the server again.
Save db and assets locally:
sspak save /path/to/silverstripe-local/webroot /tmp/mysite.sspak
and on the server vice versa:
sspak load ~/temp/mysite.sspak /path/to/silverstripe-on-server/webroot
Upvotes: 1
Reputation: 762
You can safely take your local database and put it in production, that is, assuming your local database is what you want to have on production of course.
SilverStripe does not need to store that kind of information in the database.
Upvotes: 1