Automating the backup of your blog

I had a couple of hosting issues a week or so ago which got me to thinking (worrying!) about backing up the content of this blog.

Fortunately WordPress 2.x ships with a backup plugin builtin.

The WordPress backup plugin

Unfortunately, I had failed to get the plugin to work previously and hadn’t persevered. Now, I decided, was the time to fix that before I have any problems again!!! The fix was easy enough, all I had to do was change the permissions on the backup directory to 777 and the backup worked.

The issue I had now was that the backup plugin is manual – you have to remember to go to Manage -> Backup and click the Backup button to do a backup. I’m not disciplined enough to remember to do that every day.

Fortunately, there is a WordPress plugin called WP-Cron which comes to the rescue here. It is extremely basic but when activated on the Plugins page, it adds the following options to your Backup screen.

Scheduling WordPress backups

With WP-Cron you can schedule your backup to occur nightly at midnight and have the backup emailed to you at an address of your choosing. Sure, there are lots of other bells and whistles it could have, but for me right now, the ability to get a nightly backup of my blogs is extremely re-assuring.

7 thoughts on “Automating the backup of your blog”

  1. Tom,

    How did you find the upgrade to WordPress 2.0? This and the anti-spam features have finally given me the push that I need …


  2. Angsuman, that’s not a bad idea – currently I email it to my account and this is downloaded to my Mac.

    Paul, the update was very straightforward. I backed up the files and db on the site, deleted all the files on the site, ftp’d up the new version, browsed to install.php and that was it.

    By deleting all the existing files you overcome any potential issues with plugins. You can then add back in any plugins/themes you need.

  3. If you were to set aside a Gmail account for your emailed database backups, as Angsuman suggested, you could consider it as a historic catalogue of your daily backups, but don’t discount the value of storing your database backups on your local hard drive as well. If you’re already going to the trouble of generating backups, you might as well store at least one copy locally and at least one copy remotely, just to ensure that you always have a current backup available to you.

Comments are closed.