How to create a full backup of SilverStripe
It is always a good idea to create such a backup on your own, at least when you make major changes on your SilverStripe website. This way, you will have a working copy of your website that can be restored if something goes wrong with it.
To create a backup of your SilverStripe website, you need to:
If you access your hosting account with your FTP client, you will notice a folder called public_html/. This is the main folder for content that is accessible via the primary domain name of your account. This means that if your website is accessible directly through your domain, the SilverStripe contents are located within the public_html/ directory of your account and this is the folder that you need to create a backup for. However, if your website is in a subfolder, for example called "cms" and your website is accessible via example.com/cms/, where example.com is your actual domain. In this case, you need to create a backup of the "cms" folder only.
Once you are sure about the location of your SilverStripe website on your hosting account, you need to download the whole folder, using your FTP client.
To create a backup of your database, you first need to see it's exact name. You can see such information within the configuration file of your SilverStripe webstie.
If you are not sure on how to complete that, you can review our tutorial on how to locate and edit the SilverStripe Configuration File.
Once you find the database set on your SilverStripe website, you need to log into your cPanel account and locate the Databases tab. Within that section, you need to locate and access the phpMyAdmin service.
Select the database of your SilverStripe website from the list on the left-side of the screen.
Click on the Export button from the top menu.
Click on the Go button to export a dump backup copy of your database on your local computer.
How to restore a full backup of SilverStripe
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.
To Restore your SilverStripe Backup, you need to:
Upload your Backup Files
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.
Restore the Database
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.
Link Files and Database
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.
About SilverStripe CMS
SilverStripe is an open source CMS (Content Management System) platform that will allow you to create your own website in no time. It provides a large number of essential features for the development of your website and the day-to-day update of the content of your website.
The SilverStripe framwork is built with the user in mind, which makes it user-friendly and easy to use. The most important features for the management of a CMS website feel natural and you will quickly get used to SilverStripe. With the large community of people using the application and the regularly updated blog, you will always find a place to share your thoughts or find help for your project.
The system requirements for SilverStripe are standard and Todhost provides fully optimized service that will be able to handle your website. The main system requirements of the script are:
- Apache 2.0+
- PHP version 5.3.2+
- MySQL version 5.0+
Our SilverStripe Hosting is fully compatible with the system requirements of SilverStripe.
We have prepared a set of useful links that will help you throughout the development of your website with SilverStripe.