Menu Close

4 Ways to Backup Your WordPress Blog and Avoid Catastrophe

sinking ship

If you have a website or blog, you probably have the same worry that most blog owners share – what would happen if the unthinkable would happen, and all your data would be lost?  Would that be the end of your blog?  You can reduce the risk of disaster if you have a backup plan in place.  Here are a few methods for backing up your site, along with a few pointers as well.

Photo from Ibrahim Iujaz

What Are You Backing Up?

The first decision that you need to make involves figuring out exactly what you need to back up.  Your backup typically should involve two types of data: your site files, and your site database.

When I back up 40Tech’s site files, using the methods discussed below, I don’t take any chances.  I back up ALL site files.  Some files on the server, such as cache files, probably aren’t needed, but I’d rather be safe than sorry.

Your database typically will be backed up into one file, so there’s not much to think about there.  Again, I backup the entire database, and don’t omit any tables.  The only complicating factor is if you’re using a plugin or an outside service that creates its own database.  I don’t know of any WordPress examples, but in Drupal, the CiviCRM plugin requires its own database.  If you’re using something similar, make sure that you back up that database as well.

Redundancy, Redundancy, Redundancy

We’ll cover a few different methods below, but don’t rely upon just one backup method.  You don’t want to find yourself in the situation of needing your backup, and finding that your sole backup method wasn’t working as well as you thought.  Always have more than one backup method.

Backup Methods

As noted, you will want to use more than one backup method.  Here are a few possible ways to backup your files and databases:

1.  Pick a Host With a Reliable Backup Solution

Although you will want your own backup as well, many web hosts also have backup solutions of their own.  40Tech is hosted by Hawk Host, which uses a backup solution by R1Soft that allows me to browse a week’s worth of backups (1 for each day).  I can browse my site’s directory structure from within the backup, and selectively restore files.

Hawk Host also backs up my database, although restoring that requires me to contact the support team.  Hawk Host can restore any parts of my database, down to individual tables. Hawk Host has been a dream since I started using it as my primary host when 40Tech was born (after using a big name host for other sites for several years).  If you sign up with Hawk Host using the above link, you’ll be supporting 40Tech via our affiliate link (which, as always, we only use for products that we use ourselves, and recommend).

Given how long it can take to restore a backup from your local drive, it can be comforting to know that your host is looking out for you.

2.  Use a WordPress Plugin to Backup Your Database (and Maybe Your Files)

WordPress plugins make many actions easier, and backing up your database is no exception.  I use the WordPress Database Backup plugin to have a backup of my database emailed to me every day.  I have it sent to a Yahoo mail account, which has unlimited storage.  I make sure to periodically visit that account to clean out older backups.

Another promising solution is the Automatic WordPress Backup plugin, which I recently stumbled upon and haven’t installed yet.  AWB backs up everything – your entire site and your database – to the Amazon S3 servers, which provide cheap storage and bandwidth.

3.  Backup Your Files With a Backup Program

You’ll also want to have a local backup of all of your site files.  I use a program called SyncBack SE to perform nightly backups of 40Tech.  SyncBack SE is a commercial program, but there is a free version that loses some features compared to the paid versions. SyncBack allows you to input the FTP settings for your site, and set a schedule for the backup.  Every night at the same time, SyncBack starts up, logs in to 40Tech via FTP, and compares the files there with the files that I have hosted locally.  Any new or changed files are then downloaded.

The safest way to perform a backup like this would be to rotate backups, so that you’re not always overwriting your files.  For example, you could have a different backup for each day of the week, along with a different backup for each week, and each month.

If you want to get really technical, perform a Google search for backing up a  site via rsync. Rsync is a file transfer/mirroring program that some website owners use to mirror their sites to another site, in the event of an outage.  It also makes for a good backup solution, if you can figure it out.

4.  Backup Your Site Manually

Almost all web hosts give you the ability to backup your site files and database manually.  You should do this occasionally, so that you’re not at the mercy of the whims of an automated system.  I typically perform such a backup whenever I’m making changes to 40Tech, such as when we debuted our new theme several months ago.

A manual backup could be as simple as copying all of your files to your local drive, by using an FTP program like Filezilla.  If your host offers cPanel, you can also log in and get a compressed version of your site, in a single download.

With respect to your database, you can typically download that via cPanel as well.  phpMyAdmin is another service that most hosts offer.  With that, you can select all of the tables of your database, and export them into a zip file for download.

If you combine two or more of the above methods, so that you have more than one backup method for both your database and your site files, you should be in good shape in the event of any trouble.  How do you backup your site?