3 things I learned when my WordPress blog crashed.

This week my blog crashed. It could have been a mess, but due to foresight, paranoia, and a lot of good advice from other bloggers, it was actually a pretty simple recovery process.

But, without some essential plugins and basic knowledge, it all would have been lost. So here’s the what and why of what I’d learned the day my blog crashed.

Daily backup is your friend – the most important thing you can do for your WordPress blog is download and install the WordPress Database Backup plugin. Yes, there are many plugins out there (take a look at the plugins I use) but this one should be standard on any WordPress blog. It literally saved my blog. Basically it does what it says, creates a backup of your WP database. Then saves it on your server, or emails it to an account of your choice. The backup is actually a MySQL rebuild script which you run after you’ve cleaned out your DB. Worked like a charm the first time.

Know how to run MySQL queries – the above backup is useless if you don’t know how to reinstall it. In my case, since I’d been running WordPress since version one-point-something-or-other, I decided to do a completely new install. What I did was:

  • Rename my existing blog directory. This disconnected it from my domain name and structure, yet let me have access to my original files for reference when rebuilding
  • Install the latest version of WordPress.
  • Clear the MySQL database. This deletes all blog entries and related data.
  • Run the MySQL backup query. In my case, I uploaded it into phpMyAdmin, the tool of choice for managing MySQL databases.
  • Reinstall plugins and themes. This was a great opportunity to review all the plugins I had previously installed, determine my need for them, and then download and reinstall fresh copies.
  • Reinstall supporting files and data. I copied image and other support files from my renamed ‘old blog’ directory. Customizations such as the ‘external link icons’, default Gravatar images, etc.

Start from a clean reinstall – as I mentioned above, I’d been running WordPress since the early days. It’s entirely possible that there was something from my many tweaks and customizations that borked the site. So, by starting from a clean install, I have a new, fresh baseline.

And, since I still have my original blog files stored in a renamed directory, if I forgot anything in my rebuilding of the blog, I can easily refer to my original and fix it up.

Photo courtesy PPDigital