by Tony Gamble
You’ve just been informed there’s a new update for your website’s WordPress engine, or your favourite plugin author has just released a patch that covers everything on your wish list. What’s the first thing you do? Backup, backup, BACKUP!
Just about every update message you receive along these lines comes with a clear warning to backup your data before proceeding, and yet this is still one task that many people fail to do. Last week, I gave you some tips on how to recover from problems caused by errant updates including the dreaded “white screen of death”. While those tips should get you back up and running in record time, there are certainly worse-case scenarios wherein the only recourse might be to rebuild. And to do that, you need a backup of not only the files on the server but also the database.
In my class Create and Maintain a WordPress Site, I heap praises upon my favourite backup plugin at the time, WP Migrate DB. The beauty of this plugin is not only its simplicity but also its featured primary function. By filling in just a couple of fields, you can not only create a backup of your database but also prepare it to be moved to a new home. Once installed, navigate to Tools -> Migrate DB and enter the new address of your website. Below that, you’ll also need to enter the path to the WordPress files on your new server. With options to filter out spam and post revisions, you end up with a nicely prepared SQL file (or zip file if you prefer), ready to deploy to your new host. Even if you’re not really moving to a new host, this can also be a great way to recreate your site on a testing server right on your computer using the popular WAMP or MAMP applications.
But what if you’re not moving anywhere? WP Migrate DB can still be used as a simple database backup tool. Just duplicate the Current URL and Current File Path fields into the new fields and voilà! Recently, however, I stumbled across another plugin which takes care of this all in one easy step. SQL Export is a tiny plugin with one simple purpose: to export a zipped dump of your entire database with a single click. There are no settings to configure. Just click the “Export SQL File” button and you’re done!
That takes care of your database files, which is where WordPress stores all of your posts, pages, settings… everything except the actual files that make the beast purr. To get at these, you’ll need either a FTP client, such as FileZilla or CuteFTP, or access to the file manager on your host. My favourite method is FileZilla, which is available completely free of charge. Using it is like using the Explorer in Windows (or the Finder in OS X), with separate panes for files on your host and files on your computer. Drag all of the files on your host server to a folder on your computer and within moments (dependent on connection speed, naturally), you’ll have made yourself a backup. Together with the SQL file you exported, you can now recreate your website in its entirety.
What of the regular Export option available in the Tools menu on a fresh install of WordPress? This is of course a good option as well, but bear in mind that it will only backup specified content. All or a range of posts and pages, perhaps some Events or other custom post types, but nothing else. Your settings, menu structures, configurations… only a full database backup will capture everything you need to rebuild your website with as little downtime as possible.
Just like you need to keep your personal computer backed up regularly, your WordPress website should benefit from the same due diligence. Technology can be fickle and the Internet is well populated with nasties. Don’t wait until it’s too late. Back it up.