I just spent five hours trying to save WordPress Garage and another site of mine, but some of the damage is irrevocable. Here’s the story of this nightmare, and what I’ve learned:
I have a site that was running on WordPress version 2.2. I hadn’t bothered to upgrade since we had stopped publishing on it in November for various reasons, but a recent link to one of the posts on that site from TechCrunch inspired me to get that site going again.
The site was running really slowly, which was another reason to try to fix it up. So the upgrade began.
Once the upgrade was finished and all plugins were reactivated, all the posts disappeared. I could see that they were there somewhere, since we have a section in the sidebar where random post titles show up, and titles were displaying there, but the home page was blank, and if I went to Manage > Posts, nothing showed up there.
So I backed up everything (or so I thought), uninstalled and reinstalled the whole site. Still no luck, plus I realized that I hadn’t backed up all of the site’s images in the Uploads folder – they were now gone for good. Horror number 1.
I hacked around for a few hours, and then I got into even more trouble: by mistake I imported the other site’s database into WordPress Garage via PHPmyAdmin (don’t ask). Horror number 2. That’s not great, I thought, but I’ll just restore the WordPress Garage database backup that I get emailed to me automatically with the WP-DB-Backup plugin. Or so I thought.
For some reason I has set the plugin to send backups only once a week, and the backup files were not being attached and were coming out as a big jumble within the body of the email. Horror number 3.
In short: I had no backup of WordPressGarage. I thought all was lost, and was planning my final post for this site telling people that the whole site was gone and I was giving up.
How I mostly got out of this ridiculous mess
Then I remembered that I had upgraded WordPressGarage recently, and like a good girl I had backed it up before upgrading. I found the backup file in my Recycle Bin, and imported it into the database. That fixed everything, but I was still missing a few posts. I found them via Google’s Cache, and re-entered them one by one.
So the only information missing here are a few comments. I apologize to the commenters – if you want to resubmit, please do.
The situation on the other site
It turns out that a plugin was causing the posts to disappear. I use the Sideblog plugin there (as I do here for the Shorties category that appears in the sidebar), and the older version that I was using for WordPress 2.2 was making the posts disappear for some reason. Once I upgraded the plugin, the posts reappeared.
As a result of this whole balagan (a very useful Hebrew word that means chaos and mess, and is one of the two Hebrew words that Lorelle knows, as she told us at WordCamp Israel), I was left with the following collateral damage: I lost all of the other site’s images, which is pretty blatant since every post there has a thumbnail image. In additional, all the tags have disappeared, and I can’t get them back. Plus I lost a few comments here on WordPress Garage.
This whole experience aged me a few years, but I’d like to help you live a bit longer, so here’s some advice when it comes to messing around with WordPress upgrades and databases:
- Don’t get complacent about upgrades. We do it so often, and most of the time it works, that we can get lazy. It’s understandable, especially for people running multiple WordPress blogs, since backing everything up every time and going through the whole process for every site can be really time consuming. But if you value the content you’ve produced, it’s worth taking the time to protect yourself against any possible mishaps.
- If you are using the WP-DB Backup plugin, check to make sure you’re getting the backups often enough, and that they actually work.
- Do yourself a favor and set your WordPress blog to save all images in your theme folder. You can do this by going to Options > Miscellaneous, and changing the file path to wp-content/themes/yourtheme/blogimages. That way you have everything together in one place. One of my mistakes here was that I backed up the theme files, but not the images. Or at least just remember to back up your images, wherever they are.
- Be very very careful when messing around in PHPmyAdmin. There is no undo button or option. If you make a mistake, you have to live with it.
- If you upgrade and then find that something is wrong, deactivate all your plugins and then reactivate them one by one to see if any of them are the cause of the problem. Also, make sure you’re running the latest versions of the plugins. If I had known this, I could have saved myself a lot of heartache.
- Don’t do sensitive work like this in the middle of the night. You’re brain just isn’t as clear as it is in daylight. Get a good night’s sleep, and then upgrade. This could save you from making some really stupid mistakes.
Here’s to more infrequent WordPress upgrades!