January 27, 2021

Upgrading and Why You Need a Database Backup

windowslivewriterupgradingandwhyyouneedadatabasebackup-1478fsitting-pretty-thumb.jpgSo, the latest version of WordPress has just been released, version 2.2.  I hadn’t upgraded MInTheGap to 2.1.3 because I figured that 2.2 would be coming out any day now and I was going to wait for those features.

Because of Stephen’s problems with losing his posts and not having a backup, I made sure to install the latest version of WordPress Database Backup which includes the ability to have your database saved, zipped up, and sent to you every day in your e-mail.

A few days ago, I had gotten a development environment on my Windows XP computer using xampplite so that I could test some things before deploying.

So, when I saw the new version was out, I was pretty much sure I was set– so I decided to test it first.  I don’t know about you, but disabling all the plugins and then re-enabling them is a pain, so I decided to unleash the version on my local copy first, see what bad things happened, if any, and then deploy to “production.”

Well, the upgrade looked like it went fine, but I did have a small problem I noticed.  The tag cloud on the left side was replaced by the Overall Top Posts.  No big deal, I thought.  Probably a problem with that plugin.  So, I decided to launch it in production.

Big mistake.

I tried restarting the category tag cloud component with no success.  It was then that I recognized the magnitude of the problem.  It wasn’t just the tag cloud.  It was the Executable PHP Widget.  Sure enough, all of the PHP widgets were showing the Top 10 Daily Posts.

What happened next was a lesson in chaos.  I proceeded to try to run the old Widgets plugin (since one of 2.2’s claims to fame is that it has widgets built in)– no good, it faulted.

Next I tried restarting the PHP plugin.  That didn’t work.  Before I finally got it I ended up going into the database, hacking the widget_php option in the Options table, tried removing things from the sidebar_widgets option, and googled my brains out trying to see if anyone else had run into this.

So, what did I do?  Crazy as it may seem, I’m now running Disable WordPress Widgets to disable the 2.2 widgets, and I turned back on the old widget plugin.  I had to use my database backup running locally to get the old text for the PHP Options.


So, remember, test first.  Have good backups of code and databases.  Don’t panic when things go wrong.  And be thankful that it’s only software!

(Visited 19 times, 1 visits today)

10 thoughts on “Upgrading and Why You Need a Database Backup

  1. I’ll be coming up with an update to the ExecPHP widget to fix the issues with it soon.. But your solution is really the 2nd best one (disable the built in widgets), because the built in widgets have, IMO, not been inadequately tested.

    The best solution: Don’t upgrade to 2.2. I wouldn’t. Not until some improvements are made. They rushed it out the door too soon.

  2. Additional: There appears to be a fix to WordPress 2.2 to correct the problem that the ExecPHP widget (and several other widgets) have.

    Download this file widgets.php.
    Then replace /wp-includes/widgets.php with this newer version. Problem solved.

  3. All this talk of backing databases up is scaring me…

    I’m so sorry you had such a disaster on your hands…blech! Glad you’re still here and readable! 😉

  4. Looks like I figured out what it was– the More Smilies Plugin (which is no longer supported) was conflicting with the replacement of line breaks as paragraphs.

    I’ve disabled it for now, but we don’t have anything but the default smilies. I’ll have to see if I’m smart enough to be able to fix it!

  5. I am so confused about the whole backup thing. I think I’ve asked about it before, but I don’t actually know what you’re talking about. Is it like storing all my blog files on my computer at home? Because I can tell you, that’s not happening!

    Maybe you can write a future post about it.

    And in the meantime, I don’t have the execphpwidget thingie: Should I upgrade to 2.2 or wait anyway?

  6. Craziness. Backups are a very good thing. I have been very slowly and painfully learning that lesson ;-).

  7. I just upgraded my blog to WordPress 2.2 ;-), it went very smoothly thankfully. I guess I don’t have as many plugins and widgets running as MinTheGap. I was able to use Installatron to do the upgrade which made it VERY easy (I literally hit one button and within 2 minutes had the new version). It even created a backup of everything, including my database before it ran ;-). Pretty nifty 😉

  8. Does Installatron turn off the plugins and then reactivate them? I’ve noticed that 2.2 has something for shutting all of the plugins off, and I’ve read a lot in the forums about doing a full upgrade.

    Now, I did this last upgrade– shh– without turning off the widgets and it went as I documented above. It’s not recommended.

  9. I’m really not sure. Next upgrade I’ll read the whole little summary it tells me ;-). I skimmed it, but didn’t really read every last bit. I have very few plugins running on my blog though.. so there was much less to conflict.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge