WordPress upgrade nightmare and lessons learned

January 31, 2008 – 2:25 pm | by Miriam Schwab

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.

Lessons learned

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  1. 8 Responses to “WordPress upgrade nightmare and lessons learned”

  2. By John Kolbert on Jan 31, 2008 | Reply

    Wow, what a mess! I’m glad you finally got it figured out! It would have been a tragedy to see the end of WordPress Garage. Thanks for the excellent tips. You’ve inspired me to backup my database much more often.

  3. By Miriam Schwab on Jan 31, 2008 | Reply

    Thanks John. I would have been so upset if the whole site would have been gone, after all my work on it! To say that it would have sucked is putting it mildly.

  4. By Lynne on Jan 31, 2008 | Reply

    Thank goodness you were able to finally get it back! This is one of my favorite sites, full of great WP information.
    I upgraded both my blogs last week and thankfully, there was someone with a very good knowledge of this process, standing by for assistance. He was able to get my site up and running again after using a backup file from Bluehost. This is not something I want to deal with very often and hope WP isn’t going to upgrade too often.
    I still can’t get my blogroll in my sidebar to appear, even though all of the links are in my admin blogroll panel. I think it’s a case of how knowing code would be helpful!

  5. By Miriam Schwab on Jan 31, 2008 | Reply

    Lynne – I’m so glad you like this site so much!

    Are you using widgets in your sidebar? If so, there is a blogroll widget that you just move into your sidebar. If not, you need to put a snippet of code into the sidebar: < ?php wp_list_bookmarks(''); ?>. See more info on this template tag here: http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

  6. By Austin on Feb 1, 2008 | Reply

    Hello Miriam,

    I’m sorry to hear about your backup troubles. Just so you know, the bug in WP-DB-Backup causing the email problems has been fixed for several months, so you should upgrade to the latest version.

  7. By Miriam Schwab on Feb 1, 2008 | Reply

    Hi Austin – don’t get me wrong – WP-DB-Backup is an amazing plugin and is a lifesaver. I use it on other sites and it works great. I just didn’t realize that it wasn’t working here, and I should have upgraded to the new version of the plugin a long time ago. Lesson learned, and now I hope I’ll keep on top of upgrading everything.

  8. By Jacques on Feb 26, 2008 | Reply

    The constant upgrading of WP was one of my main ‘issues’: one site is ok, 2 sites become a pain, but if you have several (client) sites that need to be upgraded (because of some security fix) once every 2 or 3 weeks, it certainly becomes an issue – after the upgrade you have to test each site for broken plugins etc. (anyone a procedure for that – please let me know!).We recently started using Zirona Instant Upgrade: http://www.zirona.com/software/wordpress-instant-upgrade/ – and so far, it works great. Only hassle so far is the Chmod-ding of directories and files and not being sure if it leaves your site unsecure after upgrading (we have to test this) – but it is in beta, so they might built-in\tighten security – so, keep an eye on it, as it is a true timesaver.Plugins are regularly updated too – but browsing the author’s site, checking versionnumbers….. This one comes to the rescue: Pluginstaller: henning.imaginemore.de/pluginstaller/. It detects older plugin-versions on your site, from where you can upgrade them. It did work almost perfect – one suggestion (I didn’t contact the author yet): once the plugin is upgraded, it is deactivated, so you have to re-activate it manually – thing is, it doesn’t indicate which plugin you just upgraded: so, you have to remember it, as it disappears from the active-plugin list, scrolling down to the inactive plugins – depending on the number of inactive plugins, it is not always easy to find it – a mark for newly upgraded plugins would make our lives even easier.Anyway, long post – maybe WPG could write a review on them, with user-experiences?

  9. By Andres on Aug 12, 2009 | Reply

    All my categories from all my blogs dissapeared and I have done nothing that could explain that. All are different versions and different themes.
    Maybe phpmyAdmin was down and caused the problem. Don’t know. Wordpress sucks! it is a nightmare.
     

Post a Comment

Studio Press Premium Themes