Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I just updated to 3.1.3 and now when I go to the admin I get the "Database Update Required" /wp-admin/upgrade.php screen. I click 'Upgrade Now' and it says it's done, but then trying to access anything in the admin gets me the same screen again. How do I get past this?

EDIT: In trying to use toscho's solution, I discovered that my wordpress db tables are not writable, which likely led to the error loop. Any ideas for how to track that down?

share|improve this question

5 Answers 5

I had the same problem recently. For some reason the option db_upgraded isn’t set by the upgrade process.

Fix

  1. Go to /wp-admin/options.php.
  2. Fill the field db_upgraded with a 0 (zero).
  3. Hit Save Changes.

Done.

share|improve this answer
1  
Where is that option ultimately stored? I can't get to /wp-admin/options.php without logging in, which shows the error message in my original post. –  Runscope API Tools Jul 5 '11 at 5:50
    
Found the setting in the wp_options table, but phpMyAdmin won't let me edit it because the table is 'Read only' which is probably why the value wasn't set and is the root of my problem. –  Runscope API Tools Jul 5 '11 at 5:53
    
@John Sheehan Something is really wrong with your DB setup. Make a backup, then try the repair option in phpMyAdmin. If it doesn’t help make the table writable manually. –  toscho Jul 5 '11 at 5:57
    
Yeah, you're right. I think I know what it's related to. Working to get the permissions on the db files set correctly. –  Runscope API Tools Jul 5 '11 at 6:02

If you didn't disable all your plugins before updating do it manually by renaming the wp-content/plugins directory.

Clear your browsers cache and all cookies and try again.

If your still having the problem open the file wp-includes/version.php to make sure it is the correct file for 3.1.3.

You should see this database version:

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '3.1.3';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
 *
 * @global int $wp_db_version
 */
$wp_db_version = 17516;

If everything checks out and your still having the problem add this to your wp-config.php file:

define('WP_ALLOW_REPAIR', true);

Navigate to : yoursite.com/wp-admin/maint/repair.php to attempt a database repair.

What WordPress version are you updating from?

share|improve this answer
up vote 1 down vote accepted

Discovered that the db files I copied over from another machine had incorrect ownership. Once I chown -R mysql:mysql myblogdbdirectory and restarted MySQL, the database upgrade worked.

share|improve this answer

For me, the solution was to restart memcached. We're using the Memcached plugin.

share|improve this answer

I just had the same problem and I got to see there was no space left on device. Database could not save data, so it could not update. For some users, it is worth checking.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.