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.
Thank You!!!!!! worked like a charm, back up and running… Saved me a ton of time..
Glad to hear that it worked 🙂 Good luck
Thank you So MUCH!! ….Exactly correct fix!!
Welcome 🙂
This solved my problem. Thanks!
Glad to hear that 🙂
Hi admin really fantastically helped for my site http://successconfirm.com/ !! Thank you so much for the admin of this website!!
Warm welcome 🙂
It worked perfectly also for a newbie 😉
Many thanks and good Christmas holidays!
Glad that it was useful. Happy holidays and an amazing new your ahead 🙂
THANK YOU!!
Most welcome 🙂