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.
  • http://wwwcpanetworksreviewed.com Aldis

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

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

  • http://www.codrosu.ro Sorin

    Hello,

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

  • http://www.clickonf5.org Sanjeev Mishra

    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.

  • http://www.movielovers.se Emil Wester

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

  • http://www.clickonf5.org Sanjeev Mishra

    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.

  • http://www.drewlevin.net/ Drew

    Great post! Nice links thank you.

  • http://www.ortopedist.org/ tempoky

    thank u for knowledge.

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

    (db_version in wp_options) changed to 12329

  • http://www.clickonf5.org Sanjeev Mishra

    Thanks, I included 2.9 as well in the post.

  • http://www.dadasign.com dada

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

  • http://blogwebdesigner.com Akhtar

    thanks very much, really great info!

  • Daniel

    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

  • http://manuthings.netsons.org/ Maluen

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

  • http://sculptingsoftware.com Brijdeep Singh

    Thanks!! .. it worked

  • http://thanetmedia.com Thanet Media

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

  • John

    Thanks! This worked like a charm.

  • http://OpEdCartoons.com Donna B.

    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! :(

  • Donna B.

    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! :(

  • http://amazingwomeninhistory.com/ Keri@AmazingWomenInHistory

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

  • Greg Hetrick

    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!

  • Vicky Karmakar

    sir, u rock !