Wordpress Error: Database Update Required

2020-02-08 09:41发布

问题:

I'm currently working with a client right now that clicked to update a plugin on WordPress. He's unaware of what plugin it was that he updated because he's clicked update in the past for other plugins and they just updated, so he paid little attention to what it was he clicked.

His site is still up, but when I try to get into the back end using /wp-admin I'm hit with a message that states:

Database Update Required

WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.

The update process may take a little while, so please be patient.

Update Wordpress Database

When I click on the button that says "Update WordPress Database" it does nothing. The browser spins and then shows me a blank white page with Wordpress at the top. I'm at a loss because I can't even login, it doesn't give me the option.

Any thoughts on what is happening? Thanks a bunch in advance for the assistance.

回答1:

This is due to a missmatch between the databases versions you said you are using in the settings.

Please follow this steps:

  1. Go to /wp-include/ folder and open the version.php.
  2. Find the value for $wp_db_version, and write it down.
  3. Now, open your database, check in the table called wp_options
  4. Find the db_version value:

    SELECT option_value FROM yourdatabase.wp_options WHERE option_name = 'db_version';

  5. Those two values must be the same. Change it in the version.php file, not the database.


Source: http://wpquestions.com/question/showChrono/id/4151



回答2:

Restarting php-fpm service helped me, it clears cache on restart

sudo service php5-fpm restart

Hope that helps some folks out there.



回答3:

  1. Try clearing your browser cache
  2. The option db_upgraded isn’t getting set by the upgrade process. Try this: go to /wp-admin/options.php. Fill the field db_upgraded with a 0 (zero). Hit Save Changes.


回答4:

This is due to a missmatch between the databases versions you said you are using in the settings.

Please follow this steps:

  1. Go to /wp-include/ folder and open the version.php.
  2. Find the value for $wp_db_version, and write it down.
  3. Open your database, check in the table called wp_options
  4. Find the db_version value:

    SELECT option_value FROM yourdatabase.wp_options WHERE option_name = 'db_version';
    

Those two values must be the same. Change it in the version.php file, not the database.