I think that everyone that blogs should know that they need to backup their blog regularly. Unlike a paper journal, blogs can be backed up easily and copied to a zillion different places if you want. However, the key element to a backup is to do it regularly and verify they work. Backups get outdated quickly.
Luckily WordPress blogs have a variety of simple backup solutions. In fact, they even have a whole section of the WordPress Codex for backups. Here’s a few simple things you can do to backup your database.
WordPress Database/Data Backups
MySQL Database Backup – There are at least 2 ways to backup your blog’s MySQL database. One is using the backup utility your host provides. I’ve found this a pretty nice way to backup the entire blog database. I recommend this backup method for most people. Other more advanced users may want to use phpmyadmin to backup just specific portions of your blog. I know I often will backup my blog without all the statistics data. It makes my backup much smaller and easier to restore.
WP-DB-Backup Plugin – As of a few WordPress releases ago, WordPress has bundled the WP-DB-Backup plugin with the base WordPress install (similar to Akismet and Hello Dolly). That means that most of you already have it available as a plugin on your system. Everyone else can easily download the latest version of WP-DB-Backup. Here’s good instructions and FAQ on using it. This backup will save the backup file to your webhost by default and can be configured to regularly email you a backup of your blog. Pretty slick. Just don’t close your browser when doing it.
Export Option – As of a recent WordPress release (yes, I’m too lazy to check the exact release), WordPress has provided a very nice Export option. It’s a really simple way to backup the most essential part of your blog: posts, comments, custom fields, and categories. This backup method is so simple. Just go to Manage–>Export and then click the “Download Export File.” This create a really nice XML file that will be really easy to restore. It doesn’t backup your theme, all the options section, plugins, links that you might have setup. However, all of that can be recreated if needed. Your blogs posts and comments would be the hardest to replace.
WordPress Files Backup
Host Provided Backup – Every hosting service I’ve seen provides some sort of backup utility. Most of them use CPanel which has a pretty robust set of backup options. On CPanel you want to do a home directory backup. This will backup every file and any file you have uploaded or configured on your website. This is my preferred method, because it zips it up and names it nicely when I download it to my hard drive.
FTP Backup – This is a really simple method to backup all the files that WordPress uses to display your blog. If you are blogging on WordPress and don’t know how to use an FTP program like FileZilla, then now’s a good time to learn. Basically in this backup you just create a folder on your local computer and copy all of your blog files into that folder. The key challenge here is to make sure that you selected the right files and that your ftp program didn’t error downloading any of the files.
I haven’t tried to make an exhaustive list of ways to backup your WordPress blog. One time I lost my entire blog (there was no option to backup at the time) and the only way I could recover it was using Google’s cache. Trust me, you don’t want to ever have to do that.
The decision on when to backup your blog is up to each blogger. The question you need to ask yourself is how much data I’m I willing to lose if something happens to my blog. For some people this may be a day and others a week. Once you’ve answered that question, then you’ll know how often you should backup your blog.
If anyone else has suggestions on other WordPress blog backup methods, please let me know and I’ll add them to the list.
Side Note: This post only applies to personally hosted WordPress blogs. If you are using a WordPress.com blog, then you can only use the Export option listed above. Luckily, that export option should be all you need to restore your blog if WordPress.com decides to take down your blog.