Words by David DarkeFebruary 24, 2017
Just like any digital asset, keeping backups of your WordPress site is essential. If anything happens to your site, your hosting company might be able to resolve the issue, yet except long delays before anything happens and/or your site being replaced by an old (irrelevant) backup with missing content. We’ll break down some modern strategies for keeping your site and content safe.
A crucial concept of running site backups is to keep the backups external. Storing your backups on the same server/account that runs the site won’t protect your from the main reasons backups are even needed in the first place. Most of these solutions will include methods for either backing up directly to external storage, or at least moving the assets to somewhere outside of the hosting environment after the backups take place (or both).
This is the broadest type of backup, it will be a snapshot of your whole hosting setup. For shared hosting this means your site, database and uploaded assets. For dedicated / VPS hosting that means everything. Also backup frequency is usually controlled by the hosting company, for example Digital Ocean will perform environment backups weekly. For a lot of sites with rapidly changing content, this won’t be acceptable.
So not only will these backups become dated very quickly, but there can also be issues when the domain company themselves are not accessible:
Also of note: Linode's backups don't help you when they can only be restored back into same region that is down :|— Taylor Otwell 🏝 (@taylorotwell) January 2, 2016
One benefit though of this type of archive is the ability to snapshot a large number of sites at once. However, being X gigabytes in size means that restoring / extracting files from a backup might be very difficult. As long as changes are infrequent, this might be a good solution.
There are a large number of backup plugins that can be installed onto wordpress directly. For most people running blogs / non transactional sites these are perfect:
These plugins will usually tick all the boxes:
The one draw back to these plugins is the fact the backup functionality is directly tied to the health of your website. If your website encounters a problem, backups could stop and in some cases actually stop without you even knowing. This could mean some areas of your site might still be working (for example the publicly facing frontend) but your backups are actually failing. It is worth noting that this actually happening in the real world is very infrequent, but must be considered when building a robust backup strategy.
There are also external services like ottomatik.io.
This will have all the features of the WordPress backup plugins, but the backup mechanism isn’t dependant on your site actually working or even being live. They usually bundle in a lot of other features like backup notifications, these can then be tailored to warn you if a backup has failed or hasn’t taken place (this could also be your first line of notification you that there might be an issue with your site in the first place). The service is also relatively inexpensive for a single site, yet costs do rise significantly if you backup a larger number of sites (or you’re an agency).
Running a custom script is the most bespoke option, it can be very cost effective if you need to backup multiple sites or servers. It will however require a far more manual setup and confidence that if something goes wrong, the backups you have made are still accessible.
Creating your own backup script does allow for complete customisation at every stage. One of the most attractive possibilities is transferring your backups to an external service like dropbox, here is a fantastic guide to creating this sort of implementation.
The power of using dropbox is it actually backs up your backups and allows you to restore revisions of files well after the actual backup being deleted. So if you only maintain 7 days of easily obtainable backups on dropbox, you will find that you can restore older revisions via their web interface very easily (sometimes up to a month).
Other external storage solutions like backupsy.com offer to large amounts of hard drive space at very affordable rates:
At Atomic Smash we take a multi pronged approach:
Having this sort of strategy allows backups to be accessible via the cloud. So if there was a catastrophic server failure, a new server could be spun up, code deployed and backups restored incredibly quickly, from anywhere.
The last crucial aspect of a backup strategy is to test your backups. Spending time and money on a robust solution is pointless if the backups are missing crucial folders, point at the wrong sites and or are just not working as they should. A great way to test a complete backup is to try setting up your live website (with all your content) in a local private environment. You will quickly see which parts of your backup routine are lacking.
Finally, whichever backup method you choose, even if you just have Environmental backups, possibly having to restore a 6 day old backup is infinitely better than having nothing at all.