Updated on Dec 10, 2015
Restoring a backup of a SilverStripe website may be necessary if there is an issue with it and you need to reverse the changes to the last point, when it was fully operational. The actual restore process of SilverStrope involves three steps and we will review each one of them for a better understanding of how this works.
The first step that you need to complete is to upload the backup of your SilverStripe content on your account. This can be done using your favorite FTP client or directly via the File Manager service within your cPanel account. Choose carefully the directory, where you would like your SilverStripe website to appear after the restore. Make sure that you remove any previous content that is located within the same directory.
The second step is to restore the database backup. You will have to create an empty database on your account and a user for it. This user must have all privileges to your database.
You can create a new database and a user assigned to it via cPanel. Simply follow our MySQL Wizard tutorial for information on that.
Once you create the new and empty database, you can access your cPanel account and locate the Databases tab in it. Click on the phpMyAdmin service.
Select the database that you have just created from the list on the left-side of the screen.
Click on the Import button from the top menu.
In the File Import section, you need to select the dump backup file of the database that you wish to restore. When you complete that, simply click on the Go button at the bottom of the screen.
By completing the steps above, you should have a location on your account, which contains all of the files and folders of your SilverStripe website. You should also have a database, which contains the backup of your SilverStripe database. Now we need to link them together. You can do so by editing the SilverStripe configuration file, where you need to correct the details for your new database.
If you are not aware on how to do that, we recommend reviewing our tutorial on how to locate and edit the SilverStripe Configuration File.
You can edit the file and enter the details for your new database using your favorite FTP client or directly via the File Manager service within your cPanel account.