Gosh, I was disappointed while upgrading to WordPress 4.7 for my website. Here’s how I solved my problem…
Problem: As soon as I updated WordPress to it’s latest version (v4.7) for my website, the browser just redirected me to /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F. The browser actually showed nothing and I couldn’t login to my admin panel, Pic 1 shows the screenshot.
Solution: I found mismatch between the db_version in Database and version.php in wp-includes. Here are the steps:
- Login to cPanel accessing your web hosting account.
- Go to phpMyAdmin and select the appropriate database of your website.
- Select wp_options and check the option_value of db_version. It should be some numeric value. In my case, as shown in the Pic 2, the value shown is 37965.
- Go to File Manager and check the version from file “/wp-includes/version.php” $wp_db_version = [some number value]. This value should exactly match with the value shown in the database. In my case, as shown in Pic 3, wp_db_version was 38590 which is not a match. And, that was the reason of the problem.
- Edit the value in version.php with the same one as found in the database. So, I changed it with 37965.
- Now try to access [your website]/wp-admin. This should work fine.