There are many times when you may want to revert back to a previous version of your site. When it comes to WordPress, the way we can do this is through a process of “backing up” your site. This process saves all of the content, settings, and files of your site as a file. Then, when you need to switch back to a previous version, you can “restore” from one of these backups.
Why you need backups
After you launch your WordPress site (or even during development!), there are many things that could happen to your site. There are possible scenarios where you would need a backup of your site to recover from.
A common example is if you install or update a plugin and the plugin breaks your site. Restoring to a previous version of the site will quickly undo any changes the plugin made.
Your site might get hacked. In order to ensure your site is safe, you may need to restore an older version of your site. Without backups, you would be unable to do so.
Additionally, there may come a time where you need to put your site on another server or hosting provider. This could be because you are changing hosting providers or your site’s current server is down. In some cases, you wouldn’t be able to use a migration plugin so using backups would be your main option. Again, without backups, you would be unable to do so.
I was helping a friend a while ago whose hosting provider disappeared. One day they existed and the next day they were shut down. This friend had no backups of the site! So, she had to recreate all of her site from scratch which took weeks causing her to lose out on potential sales.
So, as soon as you have a WordPress site, you need to begin backing it up consistently.
Where to store the backups
Before we get into discussing how to back up your site, it is very important that you know where you will store the backups. In many scenarios, you will have several backup files that you need to store somewhere.
It is very likely that you already use a “drive” service such as DropBox or Google Drive. Storing backups here are a great choice as you already have those. If you are a little more technical, you could store the backups in Amazon s3 or on another server. Even better, many of the plugins we mention below will even do this automatically for you!
While you could download the files and keep them on your computer, there may be times where you are not near your computer when you need to access them. Additionally, you will need to remember to download those files regularly.
Some of the methods will allow you to email the backups somewhere. This is not a good idea as many email services have a limit to the size of the file attachments allowed. Your WordPress site will quickly go over that limit so you will no longer receive the backups as emails.
While there are many places that you can store these backups, never ever store the backups on the same server as the site itself. Some backup plugins will allow you to store the backups in the WordPress site. However, if you need the backups because your server is down, you will not be able to access the backups because your server is down. Even worse, if your site or server was hacked, the hacker could delete or alter your backups!
How to back up your site
There are a few different ways you can back up your site: manually, through your hosting provider, and using a WordPress plugin. In all cases, there are two different things you need to back up.
The first is the database. The database is what stores all of the content and settings of your site. This will include your posts, pages, theme settings, WordPress settings, and similar. The other part of a backup is the files. The files within your site contain the actual code that runs to create the site. WordPress, your theme, and your plugins all have files that you will want to have in a backup. This is especially true if you have a custom theme or custom plugins or if you have made any customizations in your site within the files.
Manually backing up your site
If you are a technical person, you could log into a database tool, such as phpMyAdmin, to export all of the database tables. In order to keep your backups regular, you would need to manually do this step regularly. In most cases, this is not the method you should use.
To manually backup your site, you would log into your hosting provider and open the database tool. In most cases, this will be inside your cPanel like in the screenshot below.
Once you are in the database tool, you will need to select your database and then choose to export the database which should look like the screenshot below.
In addition to the database, you will want to back up the files as well. This can be done by using a “File Manager” which is normally found within your hosting provider or in cPanel. Alternatively, you can use FTP to access your files. The easiest step is to create a zip of all the files within your site.
As I mentioned earlier, this is probably not what you want to do every single week. Instead, let’s look at the two other methods that you will normally use.
Having your hosting provider manage your backups
This option will depend on if your hosting provider provides this option. Many hosting providers will offer to back up your site regularly and even restore the site from a backup if you need them to. Sometimes, this is included in your subscription and other times it may be an additional fee.
This is great to quickly get started with backing up your site without you having to do anything. However, there are a few things to be careful of. First, there have been times when a hosting provider was not creating effective backups and when people needed them, they were unable to restore from the backups.
Another issue is that if you are having an issue with the hosting provider and are trying to use backups to go to another hosting provider, it may be difficult to get your backups which may cause your site to be down while you get things sorted out.
It is always a great idea to have the hosting provider back up your site for you but I always recommend to do this in addition to using the following method. Having an extra set of backups will be useful in case one set is broken.
Using a backup plugin
Out of the three methods in this article, this is one of the best options. There are many plugins that you can install in your WordPress site to automatically backup your site and send the backup files to another location. Additionally, you can have a backup plugin create a backup whenever you need to.
Our favorite plugin (which is used on this site!) is Updraft Plus which has a free version. This free version will meet the needs of most people reading this. You can even back up your site to Google Drive for free. In addition to that plugin, some others that I recommend are BackupBuddy and VaultPress. What makes these backups great is that they can also do the restoring from a backup if you need to.
Most backup plugins will work the same way. You will install the plugin and then configure how often the plugin should back up your site. You will then set up where to send the files to and how many backups to keep.
When getting started, I suggest starting with backing up the database daily and the files weekly. If you rarely make any changes to your site, you could decrease this frequency.
In many backup plugins, the plugin will also delete older backups for you to prevent the backups taking up too much space. For example, you can have the plugin only keep 4 of the last backups. This will depend on how often you make changes to your site but I would suggest starting with keeping 5 of the last backups.
From there, select the location you want to send the files to. Again, I would recommend using a service you already use, such as Google Drive.
For now, I would suggest not changing any of the other default options. Be sure to save your settings! Once everything is set up, you will want to check occasionally to make sure that the plugin is making backups and storing them where it should be.
Now that you know what backups are, you should go and ensure that all of your sites are being backed up regularly! Going forward, you will want to make a backup of your site before updating WordPress or any of your plugins as well as before you make any major changes.