[FIX] WordPress Admin Panel Inaccessible After WP Upgrade

Updating any WordPress version from 4.6.1 to 4.8.2 will most likely give you an error halfway through the process that will redirect you to the following link:

https://yoursitename.com/wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F

This error makes your WordPress Admin Dashboard inaccessible and cannot be fixed neither by clearing browser’s cache and history nor deleting your website’s cache.

No matter if you already have or don’t have backup of your site, I will show you how to fix the issue.

Why This Error Occurs?

This error has been brought to life by a mismatch between these global variables $wp_version and $wp_db_version.

WordPress 4.6.1 has $wp_db_version = ‘37965’; while WordPress 4.7 requires $wp_db_version = ‘38590’;

wordpress version php

How To Fix It

The following steps turned to have fixed the issue and I haven’t got any problems so far with my website:

  • Download the WordPress 4.6.1 .zip archive from WordPress.org
  • Extract the WordPress installation zip archive
  • Navigate to wp-includes/version.php of WordPress 4.6.1
  • Replace version.php of WP 4.6.1 with version.php of WP 4.7 by using a FTP connection

 

Alternative Fix:

  • Change the name of your plugins folder to plugins123 (or any other name other than plugins)
  • Visit your /wp-admin page and insert your credentials if needed
  • Click on Update WordPress Database button
  • Revisit your /wp-admin page to check if the fix worked
  • Rename back the folder to plugins

Side note:

As you might have figured it out earlier, you could’ve just change the value of $wp_db_version to 38590 but this method won’t be valid if you have a different version of WordPress.

However, the steps above can be applied to any version of WordPress. Just download the previous version of your current WP version and it will do.

Now you’re ready to log in into your WP Admin Dashboard.

If you encountered problems during the process or have questions about it, leave a comment below and I will get back to you as soon as possible!

Carol Pelu
Follow me

Carol Pelu

Neutron Star at Neutron Dev
Carol is a self-taught programmer and founder of Neutron Dev. He enjoys the challenge of programming and helping people understand computers. SpaceX and Tesla enthusiast.
Carol Pelu
Follow me

You may also like...

  • uthpala

    I updated a wordpress site to version 4.8. After the update, my local setup+staging site works fine. But the live site admin dashboard is fully inaccessible. It says,”website redirected you too many times.” . So any the front site works fine. but none of the files in wp-admin are accessible.
    I am stuck in the live site. Any help would be highly appreciatable.

    • Hey,

      The issue may occur for several reasons:

      – Your home and site URLS are different or incorrect

      – There are misconfigured plugins installed that redirect your site

      – There’s a mishap with custom changes to the .htaccess file

      – A new site is created in your network with the same URL as a deleted site

      – You’re hosting multiple sites or networks on one IP address

      Open up the wp-config.php file and make sure the following code is correct:

      define(‘WP_HOME’,’http://your-site.com’);
      define(‘WP_SITEURL’,’http://your-site.com’);

      Looking forward to hearing from you!