Solution for WordPress WP-Options Issue – Database Upgrade Required

1242807744_wordpress If your blogging platform is WordPress and your webpage is redirecting to a page where you are getting a message as “Database upgrade required” even if your wordpress and database is up to date then read the instruction provided below to resolve the issue.

Problem Scenario: Webpage URL redirected to a WordPress page where the instruction appears as “Database upgrade required” or Installation Window for WordPress appears even the wordpress is already installed and up to date. The message appearing is that  ”your wordpress database is out-of-date, and must be upgraded before you can continue”.

database upgrade 1

Solution:

This is a common problem with WordPress and you don’t need to be afraid of data loss. If you will browse your wordpress database, you will find that all your posts, pages, plug-in, themes are available at their places and nothing go deleted. This is a problem related with a table named as “WP_Options” of WordPress database. The wp_options table contains some general information related to the blog which appears in the setting tab of admin. It also contains some information about the plug-in installed for the blog.

There are mainly two reasons for this issue in your WordPress blog.

  1. The Option Name db_version in WP_Options table is not equal to the field wp_db_version of version.php. You can have a look at the Version.php located under wp-include folder of your wordpress blog.
  2. The Option Name “siteurl” in WP_Options table is not populated properly.

Follow the below mentioned steps to resolve the issue-:

  • Open the phpMyadmin from your blog’s host to have a look into the WordPress database
  • Browse the table WP_Options to see the Option_Value for the Option_Name db_version. For WordPress version 2.7.1, the db_version should be equal to 9872. Other db_versions are as below,
  • WordPress Version db_version
    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
  • Open the PHP file version.php which is located in wp-include folder of your wordpress blog, and check the field $wp_db_version. It should be equal to the db_version of WP_Options table.
  • Below is the screenshot of version.php file from wp-include where you can see the $wp_db_version field as 9872 which refers to the wordpress version as 2.7.1
    5-17-2009 1-23-27 AM
    It should be equal to the db_version populated in WP_Options table. Here is the screenshot from the same table,
    5-17-2009 1-22-17 AM
  • If the fields are having same value, then the issue is with the Option_Name “siteurl” of WP_Options table. Check the value for the same. It should have the URL of your blog’s home page. Update the Option_Value of this field, and reload the home page of your blog. Here is the screenshot of WP_Options table showing the option_name “siteurl”,

siteurl

In case the problem is still there for your blog, then “check all” the  tables from the wordpress database and  select “Check Table” from the option list. Once done, then try to reload the blog’s page. Here is the screenshot for “Check Table” option,

phpmyadmin1

I hope that the problem related with your wordpress blog resolved by this time or you will have to restore the WP_Options table from previous backups. Please let us know your feedback thru comments section.

Sanjeev Mishra is a professional blogger and an Internet Marketing Consultant based in India. He has built the Internet Techies to provide you updates in technology and web application area.

21 Comments

  1. Aldis

    May 24, 2009 at 2:28 pm

    This is one really good blog I really would like to get more into Internet marketing But there is so much to them.

  2. Pingback: Wordpress - white screen of death! | twobrothersandasister.com

  3. Sorin

    December 19, 2009 at 8:48 pm

    Hello,

    I make all this but for me do not work :(

  4. Sanjeev Mishra

    December 20, 2009 at 8:09 pm

    Hi Sorin,
    Please join our WordPress forum (http://www.clickonf5.org/phpbb/general-topics-f21/) so that we can discuss the issue in details. I will definitely try to resolve that on ASAP.

  5. Emil Wester

    December 21, 2009 at 4:39 pm

    I’ve tried these suggestions. Sadly they don’t work for me. Any suggestion is appreciated!

  6. Sanjeev Mishra

    December 22, 2009 at 8:09 am

    Hi Emil,
    I have suggested another solution for your problem. Checkout the forum thread initiated by you. http://www.clickonf5.org/phpbb/code-issues-f20/database-upgrade-required-loops-t139.html
    Let me know whether that worked.

  7. Drew

    January 9, 2010 at 7:17 am

    Great post! Nice links thank you.

  8. tempoky

    January 10, 2010 at 11:33 pm

    thank u for knowledge.

    but here (http://codex.wordpress.org/Version_2.9)

    (db_version in wp_options) changed to 12329

  9. Sanjeev Mishra

    January 14, 2010 at 6:27 pm

    Thanks, I included 2.9 as well in the post.

  10. dada

    March 29, 2010 at 8:42 pm

    Great !
    That helped me out. Thanks !!!!

  11. Akhtar

    June 10, 2010 at 3:17 am

    thanks very much, really great info!

  12. Daniel

    June 23, 2010 at 4:07 pm

    Thanks for that info! =))

    For version 3.0 it’s her:
    http://codex.wordpress.org/Version_3.0
    (db_version in wp_options) changed to 15260

  13. Maluen

    July 15, 2010 at 3:30 pm

    Very useful article! It solved me a big problem ;)

  14. Brijdeep Singh

    July 15, 2010 at 4:47 pm

    Thanks!! .. it worked

  15. Thanet Media

    January 5, 2011 at 6:18 pm

    Thanks for this. Just had to change my database version.

  16. John

    February 10, 2012 at 6:53 am

    Thanks! This worked like a charm.

  17. Donna B.

    June 20, 2012 at 3:01 pm

    Where is version.php? I can’t find it anywhere! I got this error from Database when trying to upgrade to 3.4. Now myAdmin page is gone, just get error in line 94, and I can’t find line 94 in mysql, either.

    The blog linked here is fine, but my new one is totally broken! :(

  18. Donna B.

    June 20, 2012 at 3:04 pm

    My entire comment disappeared. Where can I find the version.php in my wordpress files? My whole site disappeared trying to update to 3.4! :(

  19. Keri@AmazingWomenInHistory

    July 10, 2012 at 7:49 pm

    I got this error after upgrading to 3.4, and this worked perfectly! Thanks so much :)

  20. Greg Hetrick

    September 14, 2012 at 3:18 am

    I got this after upgrading to version 3.4.2, almost had a heart attack over it. Went into wp_options and changed db_version to 21707, and it worked like a charm! Thank you so much!

  21. Vicky Karmakar

    October 1, 2012 at 2:48 pm

    sir, u rock !

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>