Why is WordPress saying “Database Update Required” when I try to login?

If WordPress gets confused about it’s database, such as when you install a WP update, then revert, you may find yourself unable to login without agreeing to perform a database update.
wp-update-screenshot-20140108
One reason this can happen is that your “db_version” string got updated in the database by the code upgrade.  Each version of WordPress has an appropriate db_version.

You can view it and set it:

mysql> SELECT * FROM wp_options WHERE option_name="db_version";
+-----------+-------------+--------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+--------------+----------+
|        52 | db_version  | 26691        | yes      | 
+-----------+-------------+--------------+----------+
1 row in set (0.00 sec)

mysql> UPDATE wp_options SET option_value=25824 WHERE option_name="db_version";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql>

..and that should make the database message go away.

Database versions:

WordPress Version value for db_version
3.8 26691
3.7 25824
3.6 24448
3.5 22441
3.4.1 21115
3.4.2 21707
3.4 20596
3.3.3 19470
3.3.2 19470
3.3.1 19470
3.3 19470
3.2.1 18226
3.2 18226
3.1.4 17516
3.1.3 17516
3.1.2 17516
3.1.1 17516
3.1 17056
3.0.6 15477
3.0.5 15477
3.0.4 15477
3.0.3 15477
3.0.2 15477
3.0.1 15477
3.0 15260
2.9.2 12329
2.9.1 12329
2.9 12329
2.8.1 10850
2.7.1 9872
2.7 9872
2.6.5 8204
2.6.3 8204
2.6.2 8204
2.6.1 8204
2.6 8201
2.5.1 7796
2.5 7558
2.3.3 6124
2.3.2 6124
2.3.1 6124
2.3 6124

Older database values from: http://www.clickonf5.org/2247/solution-database-upgrade-required/

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon

Leave a Reply

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