Atomic Smash homepage splash

Backup strategies for business critical WordPress sites

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).

Hosting environment backup

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:

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.

WordPress Backup plugins

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:

  • Custom scheduling of backups.
  • Simple backup restoring.
  • Double saving of backups to an external system / server.

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.

External service

There are also external services like ottomatik.io.

backup wordpress with ottomatik

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).

Custom script

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:

backupsy is an external VPS service

What do we do?

At Atomic Smash we take a multi pronged approach:

  • Website source code:
    • We use Git to keep all code on a centralised external service – GitLab. So local copies of code are available on developer machines, online versions are kept in GitLab and backups of this whole system are maintained to an external server.
  • Individual websites:
    • Server environmental backups are taken every week by Digital Ocean.
    • A custom script backs up sites every 12 or 24 hours, saves 2 days worth of backups locally and stores 7 days of backups externally on dropbox.
    • A Slack notification is also sent to a #backups channel to tell us if backups are or aren’t successful.

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.

Testing

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.

Profile picture of David Darke

David Darke

As the lead developer and co-founder at Atomic Smash, David’s wealth of knowledge in website development means that all sites work seamlessly across desktop, tablet and mobile devices.

Go back to top

Keep up to date with Atomic news