Not able to access admin panel after updating WordPress database fails

After upgrading to WordPress 3.5.2 I can’t log in to the control panel anymore. Instead, I’m redirected to /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F where I’m presented with a ‘Database Update Required’ message and an ‘Update WordPress Database’ button. When I click on the button the page reloads, runs for a couple of seconds, and then nothing happens. All I get is a screen with the WordPress logo at the top and nothing else. The URL of the page is /wp-admin/upgrade.php?step=1&backto=%2Fwp-admin%2F.

I’ve tried various things to resolve the issue, without luck:

  1. Wait for an hour to see if the problem goes away (the first page
    does say that “the update process may take a little while”)
  2. Tried to click the button in four different browsers
  3. Checked the server’s error log (no errors at the time of the upgrade)
  4. Restored the database (I made a backup before I started the upgrade)
  5. Renamed the folder of my theme
  6. Renamed the plugins folder

The only other solution I can think of is downgrading WordPress to an older version. Does anyone have a better idea please?

PS – While searching for a solution I noticed a similar query was closed as “too localized”. However, I reckon this is an issue “generally applicable to the worldwide audience of the internet”. I’m not the first person to come across this issue, nor do I think I’ll be the last!


The problem, it turns out, was that the db_version field in the wp_options table and the wp_db_version variable in the file /wp-includes/version.php didn’t match. In my case (an upgrade to 3.5.2) the database showed “22441” while the PHP file showed “22442”. Changing the number in the database to “22442” solved the issue.

I’m not quite sure if this is a proper fix – I suspect the ‘Update Database’ script does more than just updating the db_version field. But… I can log in again and the dashboard tells me I’m using the latest version of WordPress.

For a more detailed explanation (with screen dumps) and a second possible solution, see

Leave a Comment