admin管理员组文章数量:1122846
After upgrading to WordPress 3.5.2 I can't log in to the control panel anymore. Instead, I'm redirected to /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F where I'm presented with a 'Database Update Required' message and an 'Update WordPress Database' button. When I click on the button the page reloads, runs for a couple of seconds, and then nothing happens. All I get is a screen with the WordPress logo at the top and nothing else. The URL of the page is /wp-admin/upgrade.php?step=1&backto=%2Fwp-admin%2F.
I've tried various things to resolve the issue, without luck:
- Wait for an hour to see if the problem goes away (the first page does say that "the update process may take a little while")
- Tried to click the button in four different browsers
- Checked the server's error log (no errors at the time of the upgrade)
- Restored the database (I made a backup before I started the upgrade)
- Renamed the folder of my theme
- Renamed the plugins folder
The only other solution I can think of is downgrading WordPress to an older version. Does anyone have a better idea please?
PS - While searching for a solution I noticed a similar query was closed as "too localized". However, I reckon this is an issue "generally applicable to the worldwide audience of the internet". I'm not the first person to come across this issue, nor do I think I'll be the last!
After upgrading to WordPress 3.5.2 I can't log in to the control panel anymore. Instead, I'm redirected to /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F where I'm presented with a 'Database Update Required' message and an 'Update WordPress Database' button. When I click on the button the page reloads, runs for a couple of seconds, and then nothing happens. All I get is a screen with the WordPress logo at the top and nothing else. The URL of the page is /wp-admin/upgrade.php?step=1&backto=%2Fwp-admin%2F.
I've tried various things to resolve the issue, without luck:
- Wait for an hour to see if the problem goes away (the first page does say that "the update process may take a little while")
- Tried to click the button in four different browsers
- Checked the server's error log (no errors at the time of the upgrade)
- Restored the database (I made a backup before I started the upgrade)
- Renamed the folder of my theme
- Renamed the plugins folder
The only other solution I can think of is downgrading WordPress to an older version. Does anyone have a better idea please?
PS - While searching for a solution I noticed a similar query was closed as "too localized". However, I reckon this is an issue "generally applicable to the worldwide audience of the internet". I'm not the first person to come across this issue, nor do I think I'll be the last!
Share Improve this question asked Jun 24, 2013 at 23:22 unhackunhack 5911 gold badge4 silver badges8 bronze badges 7- 1 Does your server meet the requirements? What version are you upgrading from? I tend to find a bullet-proof fix is to download the latest version, extract, then upload & overwrite via FTP. – TheDeadMedic Commented Jun 24, 2013 at 23:59
- when you do #4 (restore the database) does WordPress allow you to log in? If so are you then asked to upgrade? Also like @TheDeadMedic said are you going from 3.5.1 to 3.5.2 or something else? – Brooke. Commented Jun 25, 2013 at 5:34
- @TheDeadMedic - The server requirements are met (PHP 5.3.26 and MySQL 5.5.32) and the last upgrade I did was about three months ago, so that will have been 3.5.1. I tried a manual install (via FTP) but still got the same issue ;( – unhack Commented Jun 25, 2013 at 12:53
- @BandonRandon - No, it doesn't. I thought restoring the database would definitely solve the issue but it didn't. – unhack Commented Jun 25, 2013 at 12:56
- 2 Looks like it could be a theme problem according to this support question on WP.org wordpress.org/support/topic/database-update-required?replies=9 (yes I know its two years old) – Brooke. Commented Jun 25, 2013 at 18:03
9 Answers
Reset to default 31The problem, it turns out, was that the db_version field in the wp_options table and the wp_db_version variable in the file /wp-includes/version.php didn't match. In my case (an upgrade to 3.5.2) the database showed "22441" while the PHP file showed "22442". Changing the number in the database to "22442" solved the issue.
I'm not quite sure if this is a proper fix - I suspect the 'Update Database' script does more than just updating the db_version field. But... I can log in again and the dashboard tells me I'm using the latest version of WordPress.
For a more detailed explanation (with screen dumps) and a second possible solution, see www.clickonf5.org/2247/.
Check file “/wp-includes/version.php” $wp_db_version = [some number value]
against the database options table’s options_value
. They should have the same number value. If those numbers are not the same, change the value in the options table to match the value in the version.php
file.
Look in file called version.php
in wp-includes
directory:
* @global string $wp_version
*/
$wp_version = '4.3.2';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
*
* @global int $wp_db_version
*/
$wp_db_version = 33055;
And verify if the wp_version
and DB_version
is the SAME in your website.
The db_version
you can look for in phpMyAdmin. For the version of WP, check the last update you made in your website.
Well I have a very perfect answer for you. The problem occurs only when your server database need an update.
Here is the step by step EASY process How I solved my problem very easily
Open File Manager of your webhosting account
Navigate to plugin folder (located in wp-content)
Rename the plugin folder to
plugins123
Visit your website /wp-admin page
Your browser will automatically redirected to this page.
Click on the Update Wordpress Database button and once the database update completed, go back to the File Manager and rename your plugin folder back to plugins
The process was taken from http://www.vashistha.in/2016/12/problem-solved-upgradephpwphttpreferer2.html
I work for a web hosting company. See this error time and time again. Easy fix
1. Go into phpmyadmin
2. Select all the tables and run repair
Now go back to yousite.com/wp-admin and when prompted for database update accept. Voila! It will run and complete and work this time.
Thanks, had the same problem and your solution worked for me too! Thank you so much for sharing this, you saved me a lot of time and I appreciate it!
After I tried this solution and it worked I found this one which suggests uploading the upgrade.php file from a clean download of the Wordpress version you are upgrading to. I uploaded it and then browsed to the upgrade.php page and got the update the database button and updated the db successfully. So you might want to finish off with that step just to be sure everything in database is also what the installed version expects.
http://wordpress.org/support/topic/352-update-cant-access-admin-area?replies=8
Make Sure your database has mysql:mysql
Permissions
Depends on your install:
chown -R mysql:mysql /var/lib/mysql
or
chown -R mysql:mysql /var/lib/mysql/YourDatabaseName
should fix all your databases.
If you do not know the exact path do:
find / -name YourDatabaseName
(found in wp-config)
That worked with the change that you have to temporary rename: wp-content/plugins to wp-content/plugins123 Then go again to blog/wp-login and you are redirected to the db upgrade page. The issue is caused by some security plugin that denies access to the database upgrade page. In my case was WorldFence.
I have an alternative solution. For me, the problem was that I was using the redis object cache, and it turns out that the wp_db_version was not updated in the redis cache after the wp update. To repair, I just had to flush my redis cache, and the problem was gone.
本文标签: upgradeNot able to access admin panel after updating WordPress database fails
版权声明:本文标题:upgrade - Not able to access admin panel after updating WordPress database fails 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736295550a1929593.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论