Backup Your WordPress Installation Easily

Written by Mike on March 31, 2010

Yesterday, Automattic, the company that brought you WordPress and hosts 10+ million blogs at WordPress.com, announced a new product called VaultPress, that will backup your WP install to the cloud.

On their blog, they described VaultPress this way:

The vision of VaultPress is to ensure that blogs and sites under its care are always completely secure, regardless of what happens. Today, this means every bit of content will be safe, from plugins and themes to the smallest comment or post revision, with WordPress-aware, real-time, multi-cloud backups. This is some of the most advanced technology I’ve seen interact with WordPress.

TechCrunch estimates that it will cost $15-25 per month to backup your tables and assets with VaultPress. They’re just opening up the private beta of this service, so expect to hear more from users over the next couple of months. You can sign up for the beta here.

At quick glance, it’s good that WordPress is making it easier to backup installations and I hope the system is easy to setup and maintain. That’s been one of WP’s biggest strengths – it’s ease of use and hopefully that will continue on with VaultPress.

If you don’t want to use VaultPress, there are other ways to backup your WordPress data and assets. Here are a few ideas you can start using today. I use all of them, because I’m paranoid about losing content. This is a good trait to have, especially if you’re using WordPress as a CMS.

WP-DB-Backup

Themes can be re-installed or restored from a backup, but the key piece of data you can’t lose when it comes to WordPress is the MySQL database that runs the whole show. The WP DB Backup plugin will backup your database on a schedule (hourly, daily, weekly, monthly) and the backup file (a gzipped file) can be saved to the server in a location you determine, downloaded on demand or emailed to you. You can specify which tables in the database you want included, which is nice.

I prefer emailing a backup to Gmail (where size isn’t a problem) and archive a few there just in case. The email looks like this and can be easily filtered and labeled.

Backup email

Automatic WordPress Backup

The Automatic WordPress Backup will grab your entire WP directory, assets, themes and your database and put it in one file and automatically upload that file to your Amazon S3 account. Like the DB plugin, you can specify how often you want your files backed up and what to include (configs, database, themes, plugins and user uploaded content.) This is a nice “set it and forget it” type backup plan. I know that the backups run weekly and go to S3, where I don’t have to worry about it until I need it.

What I like about this is that it will present you, inside the plugin, a quick download link to your backup files. This saves you the step of getting into S3 to grab the file you need.

This is a very cost efficient model, since storage at S3 costs $0.10USD for each gigabyte you store, and WP backups are usually under 5MB, so you’re paying maybe a few cents a month for piece of mind. Well worth it, I think.

The plugin config screen:

What it looks like in S3:

Backup to S3 from the Command Line

This one is not for the faint of heart, or those not comfortable with working in a Linux/Unix command line environment. This script by Eric Nagel grabs your databases (not just WordPress, any of them you want), your web directories and whatever else you want, zips them up (separately) and sends them to S3. You can specify how many previous days of backups you want to keep and the script will delete backups older than x number of days (I usually set this to 5.) If you need to backup files larger than 2GB (a PHP limitation), check out this blog post.

I like this method because once set up and set to run via Cron, you can very easily do nightly backups of your entire web root as well as your databases. While your IT department or hosting company is doing full and incremental backups, getting, say, one database table or file is a pain for you (as well as the IT staff). This method makes that much easier.

This type of backup is absolutely critical in case the entire machine catches fire. This S3 method just backs up the web area, making your life a tad bit easier when it comes time to recover something. Since you can specify more directories and datbases than just WordPress, this method may end up costing you a bit more, but that security is well worth the small cost from Amazon.

Repeat after me: it’s always good to have more than one backup of your data. Always.

Posted Under: Amazon S3, wordpress

1 reply to “Backup Your WordPress Installation Easily

  1. Eric Nagel

    Thanks for the link back! I love the simplicity of setting up a script & knowing that it’s running smoothly. And having my entire server backed up for a couple bucks a month isn’t bad, either.

    Having the data on S3 is nice because you can use many different applications to get to it, from another server or a desktop machine.

    Thanks again!
    Eric

Comments are closed.