Imagine if your website and website files disappeared overnight. Not a nice thought and thankfully rare but that is the nightmare scenario you should consider when you evaluate the risk arising from any business interruption. That is why having a plan in place for website backup is important and you should discuss the issue with your website hosts and web developers
Why do a website backup
First of all, while we prepare for the worst it’s unlikely that your website will disappear overnight as long as you are using a professional web hosting company. More likely however is some sort of problem occurring where the latest version of your website is not working properly and the most efficient solution is to roll back to an earlier version of the website to get it working again.
If for example your website uses a Content Management System like WordPress, Joomla or Drupal, then it is a good idea to keep the version up to date for improved security, speed and other benefits. If you run an online shop with one of the best e-commerce platforms such as Magento, Prestashop Woo Commerce etc then keeping up to date is especially important as hackers would love to steal your customer information.
Before you install the latest version of your Content Mangement System or e-commerce platform then you should take a backup of your website files and database. There are a number of options available to you depending on how your website is hosted.
Backup using FTP software and phpMyAdmin
If your website is flat html then you can simply use an FTP program like Filezilla, log in to your hosting and then download the ‘public_html’ folder to your computer. This will copy all the relevant files and folders. If your website also uses a Content Management System or e-commerce platform then it will also have a MySQL database which should also be backed up.
Go to phpMyAdmin or similar MySQL database editing software and login to your database:
- Select your database and then the Export tab.
- Select the Export method ‘Quick’, and leave the format as SQL.
- Click ‘Go’.
- This should open up a dialog box so you can download a SQL (a text file) to your local computer.
- Store this in the same folder as the website files or ‘public_html’ folder.
Backup using cPanel
If your website is using a Linux server then, if you’re lucky, you will have access to the cPanel control panel which makes Backup an absolute breeze.
- Login to your cPanel.
- Under the files section, click on Backups.
- Under Partial Backup and Download a Home Directory Backup, click on the Home Directory button.
- You can now navigate to the folder your web-browser downloaded the backup to, in this case we can see our backup is named backup-example.com-1-30-2013.tar.gz (you can use a open source program like 7zip to unzip these files on your local machine).
- Make sure that you have enough server space to accommodate the backup file by viewing the left hand column of cPanel > Home.
You will also need to use phpMyAdmin to take a backup of the database. Remember to take this as soon as possible after you have made a backup of your files so you have a representative snapshot of the working version of the website.
See How to Backup your website files in cPanel for more information and a video.
Other backup options
If you use WordPress then there are numerous free and premium Backup plugins that you can use from the Admin Dashboard see this article for more information: 7 Best WordPress Backup Plugins Compared (Pros and Cons)
If you use other systems then they will have similar options available. For example the e-commerce platform, Prestashop has an in-built website backup and restore system. If you use cPanel, then you can backup automatically using so-called Cron jobs. We will cover this in a future blog posting as well as restoring your website from a backup.
Make sure you discuss website backup and restoration with your web hosts and web developers to make sure you have the nightmare scenario covered.