Automated and redundant Wordpress backup via email

The WordPress worm that was going around a few days ago got me thinking about backups. A lot of people harp about how you really ought to be backing up your data, but backing up something like Wordpress is a little more complicated than backing up local data, especially if you don’t know how to set up cron jobs. And even if you do, this only protects you from certain kinds of problems (malware, database corruption and the like), not catastrophic hardware failure (since it’s likely that you’re keeping the backups on the same physical machine).


So I set myself up with with a very simple but apparently quite effective solution for Wordpress backups. Three parts:

  • The WordPress Database Backup plugin is a spiffy little plugin that lets you schedule snapshots of your entire WP database, with the option to include additional tables created by third-party plugins. Most importantly for my purposes, the plugin allows you to schedule backups to be emailed to yourself.
  • The plugin zips the database dump and sends it as an attachment to my Gmail address. I created a Gmail filter that takes all emails from that address, marks them as read, and archives them. That means that every day I have an up-to-date snapshot of my Wordpress installation on Gmail’s servers, instead of on the server where my blog is hosted.
  • Once a month or so (more frequently when the web interface goes down), I open up Thunderbird on my laptop, which grabs copies of all old mail via IMAP. Now I have copies of my WP database on my computer as well.

This is probably an obvious system that other people have implemented, but I haven’t seen many people write about it. Hope it helps someone.

Leave a Reply

Your email address will not be published. Required fields are marked *