Backup Solutions for Serendipity and WordPress blogs
by Sapphire (December 29, 2005)
I still haven’t found a perfect solution for WordPress backups (though I will report on Skippy’s plugin in a moment, which is close). But Serendipity has come out with great new backup interface - everything’s completely automatic, if your host allows, and it backs up your HTML files as well as your database. Here’s the skivvy:
It’s an “event” plugin, available through Spartacus (Serendipity’s one-button plugin and theme installer). Just grab the plugin “Backup Interface”, then go into its options panel. The first time, it’ll establish what folder you want to download to - I made a “backups” folder outside my public_html, which seems to be its default setting. Save that, and you go into the real options panel. Mmmm, choices!
For the database, you can choose to backup your structure, data or both (I chose both). I also chose to gzip it, and have it backup the whole database. You can choose to have it do backups every ten minutes, every four weeks, or at a lot of intervals in-between - I’m at every 12 hours, for now. Best of all, you can also have it automatically delete backups every 12 hours, every 6 months, or something in between. I went with 7 days. That way, your server isn’t getting clogged by more backups than you can hold on it.
For the HTML backup (pretty sweet, huh?), I chose to backup every 24 hours and delete every 4 days (the HTML backups will be huge). You can also easily download or delete any backups currently on the server from here. Note: the backups won’t happen automatically unless your host allows exec() calls. Mine doesn’t, because they claim they’re a security risk (and they’re probably right - I suspect anything that can automatically backup your files is also pretty handy for spammers and phishers). However, I still love this plugin - every time I post, I hit “backup interface”, make my backups, download them to my computer, and delete them on the server. Saves me a few extra keystrokes compared to logging into cpanel.
Now, for WordPress, Skippy’s plug-in will backup your database, but not your HTML. It doesn’t have quite the range of options Serendipity has, but it does include one Serendipity doesn’t: if you also install the Skippy’s WP-cron plugin, you can select to have the backups emailed to you daily, rather than having them sit on your server. Which I think is pretty cool. And it works so far on the hosts I’ve tried it on.
Install is pretty darn simple. I would start with WP-cron first.
(1) Download both archives from the links above.
(2) Unpack them both on your computer’s hard drive.
(3) Drop the wp-cron.php file into /wp-content/plugins/, and activate the plugin. You may also want other plug-ins from this pack, for totally unrelated stuff - just drop them in and activate them, too.
(4) Now create a directory “/wp-content/backup/” inside your WordPress directory, and make it writable by your webserver (chmod 0777).
(5) Drop the wp-db-backup.php file into /wp-content/plugins/, and activate the plugin.
In your admin panel, you can click Manage to find the “Backup button”. It’s pretty straightforward - by default, it backs up all your tables, and then you get to choose whether you want it emailed to you or backed up on your server. And you can choose to have it automatically emailed to you daily - or just backed up on your server daily.


