WordPress 2.0.7 to 2.1 Upgrade – screwed up (almost)

Ok, so I’m writing this down in English, just to avoid everybody the trip to Google Translate. (English translated to Italian sounds funny, but Italian to English is really weird – at least to me)

While upgrading from 2.0.7 to 2.1, the upgrade procedure failed horribly on me with quite a lot of SQL errors. Let me make it clear right now: it is not WordPress guys fault, it’s mine.
The user accessing the database did not have all the permissions needed to upgrade the structure and the content of the tables — so I was left with a half-dead blog.
The live half consisted of the public pages, good.
The dead half was the administrative interface, bad. While the error messages were different (I could distinguish between a successful authentication and a bad password), all I got was the dreaded

“You do not have sufficient permissions to access this page.”

To make a long debug story short: being too lazy to dig inside the WP internals and understand which parts of code were running the authentication, I just choose to guess the tables which may have been screwed up by the limited upgrade. They could not be posts, categories, links, or the like, right?

Did I mention I didn’t make a backup before? (living on the edge :P) All I had was a backup a couple of days old, and I didn’t want to loose the last couple of comments and posts.

Anyway, I decided to bet on

  • options
  • users
  • usermeta

Got them out of the two-days-old SQL dump, and restored them on the half-new database — then run again the upgrade procedure after fixing user privileges on the db.
That’s all, now I have a shiny new admin section working.

MAKE BACKUPS! :)

Author: zen

Geek of all trades, having fun with *NIX, the Internet and computer security since 1995.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.