How (and why) to back up your WordPress site
Imagine what would happen if your website were to stop working right now. What could you lose as a result? How much work would it take to get back up and running again?
If your site is backed up, that answer might be ‘not a lot’. On the web, you’ll inevitably encounter a problem eventually. Having a backup can make the difference between a major catastrophe and a minor inconvenience.
Historically, in WordPress, layout and styles exist in the site theme, with page content stored in the database. The advent of the Block Editor changed that slightly, but the parts of your site that need backing up remain the same:
- Site theme
Site styles, templates and layout patterns live here. Some theme-specific assets, such as fonts and images, are also stored in the theme.
Images or documents uploaded to the site are stored in a separate uploads folder.
Stores all website and block settings, theme customisations, and website content. Any information entered through the admin system ends up stored in the database.
Most WordPress sites use plugins. These live in their own separate folder called, appropriately enough, plugins.
- Custom block plugins
Some websites rely on bespoke custom blocks that go with the theme. These are included via one or more block plugins, which live in the plugin folder with the other plugins.
Many common website tasks make changes to your files and database. Things like running updates, posting content, and receiving comments or ecommerce orders. A regular backup routine is essential to ensure you always have a recent copy of your site to fall back on.
Why back up your site?
Backups are like an insurance policy for your website. And like insurance, they can seem tedious and unnecessary until the day you need them. At which point, they suddenly become one of the best decisions you have ever made.
Problems are inevitable, in the end, and many are out of your control. Whatever the cause – server crashes, a hack or malware attack, or good old fashioned human error – the result is the same: your website is offline, your CMS inaccessible, your data corrupted or lost entirely.
A recent backup lets you restore your site and get back to normal operations. A regular backup routine gives you the peace of mind to be able to focus on the day to day of running your website.
What to back up
WordPress recommends that you back up everything, including all WordPress core files. However, this isn’t a requirement. If storage or time is an issue, you may choose to back up only the parts of your site that are unique. This data is stored in several places in your WordPress installation.
WordPress core files
Every WordPress site is self-contained, and includes a full version of WordPress. You can safely exclude these from your backups, as they are easy to get hold of. The consequence is that if you want to restore your backup you will need to set up a new blank WordPress site first. Once this is up and running you can copy your backed up files over the top.
Themes and uploads
The files you definitely need to back up are the following:
- Theme – stored in
- Uploads – stored in
Any plugins your site uses are stored in
/wp-content/plugins. Plugins from the WordPress Plugin Directory can be excluded from backups, as they are easy to reinstall if needed. Their settings will be preserved in your website’s database.
An exception to this is if your site relies on any custom block plugins. Back these up along with the rest of your files, as your site needs them to function. If the block plugin is missing, you won’t be able to view or edit these blocks in the Block Editor (although the front-end of your site will continue to work as normal).
Full, partial and incremental backups
Some backup tools give you the option to choose what kind of backup you want to take of your site. A full backup, as the name suggests, is a complete copy of your site, including all files and the database. Any full backup can be used to completely restore your site to its state at the time the backup was taken.
A partial backup only includes the unique parts of your site. In WordPress sites, that’s usually the
/uploads folders, plus the database. This saves space, which is especially important if you have a lot of backups, but makes restoring your site a more involved process, as you first need to set up a clean WordPress install before applying your backup over the top.
Incremental backups only store information that has changed since the last backup was taken. Benefits of this approach are a much faster backup speed, and lower storage requirements. However, they can be harder to restore from, as they only include part of the data.
How to back up
There are various approaches you can take to backing up your WordPress site, depending on your requirements and the time you have available.
The most basic, barebones approach to backups. First, log into your hosting control panel and export a backup of the site database. Next, use SFTP or other file manager to download the folders you want to save. Once you have everything downloaded, you should then make a copy to store at another location.
This approach is cheap and cheerful, and might be workable for small sites that aren’t updated often. However, for anything else, this probably isn’t the way to go. It will work, but is too time consuming and error prone to form part of a regular backup routine. For that, you’ll want a solution you can automate.
Using a plugin
The next step up from manual backups is to use a plugin. There are several free backup plugins available for WordPress, which allow for manually triggered backups, as well as automated versions.
Some of the most popular backup plugins available for WordPress include:
Most plugins allow you to automate your backups, and connect to various cloud storage providers to let you save backups remotely. This is vital for situations where you lose access to your website. However, a risk of plugin-based backups is that they are tied to your website, meaning that an attack on your website also has the potential to also compromise your backups.
At the hosting level
Many web hosting companies offer built-in backup solutions. These typically store an image of the entire site at a particular moment. You usually have the option to trigger a backup manually, or to automate the process – taking new backups at regular intervals.
This approach has a number of advantages over manual or plugin-based back ups. The process is automated, meaning you don’t have to remember to do it. At the same time, it’s handled at the hosting level, separate from your website. This means that if something goes wrong and you are unable to access your site, you can still get to your backups.
A comprehensive, practical backup routine
The perfect backup solution would take a copy of your site every time a change was made. For most websites though, backing up once a day, or even once a week is enough.
At Push to Dev, we back up our sites daily at the hosting level. Backups are remote, so can be rapidly reinstated even if the website is inaccessible. On top of these, we take full backups before any major change to a site – such as plugin or platform updates.
Need help setting a regular backup routine for your WordPress site?
You should get in touch.
* indicates required fields