• Automatic and Manual upgrades break the login and now when attempting to login or view any wp-admin page, the site returns 404 with this URI: /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Moderator Marius L. J.

    (@clorith)

    Hiya,

    This is an expected page to be redirected to (to ensure that any DB changes have been ran as they should, if there are any), and is a part of the post-upgrade flow with every release.

    That you are seeing a 404 error for this file though, would normally indicate that you have an incomplete update on your hands. You mentioned that you’ve attempted a manual update, and that the error remains though, would you mind sharing how you did the manual update; for example, was it following the steps from https://www.ads-software.com/documentation/article/updating-wordpress/#manual-update, or some hosting-specific instructions (and if it were hosting-specific, would you be able to attempt the instructions from the official documentation)?

    Thread Starter Meagan

    (@mtruglio)

    Hey Marius,

    I might be using the wrong terminology. The “automatic” update was when it ran on it’s own last night. The “Manual” update was when i logged in and click the upgrade button to trigger the update. I didn’t manually copy over any files. Sorry for any confusion in terminology.

    Moderator Marius L. J.

    (@clorith)

    No worries about the terminology, it’s one of the hardest parts of tech on the internet these days (and we all know things under different terms) ??

    So yes, it sounds like you have an incomplete upgrade on your hands then, are you able to attempt the manual copying of files as outlined in the article above? (some hosting providers are also able to help with this if you are stuck, although I can’t guarantee that this is the case)

    Thread Starter Meagan

    (@mtruglio)

    Hey Marius,

    I will attempt the method you recommended later tonight after hours as this is a live website. I will report back with the result. Thanks for the tip!

    Hi Meagan, have you had any success? I’m having the exact same error on 3 websites that auto updated.

    Thread Starter Meagan

    (@mtruglio)

    I tried clearing out my browser cache just to try something low impact and quick. That seems to have worked on the sites that had the redirect issue. I still have a few sites to update yet, but so far doing that got me back into the Admin panel. Then I refreshed the permalinks, which then allowed me to login normally again. I hope that is helpful.

    Thread Starter Meagan

    (@mtruglio)

    I just tried a few more sites to see how it would go. I found that anytime i upgrade a site in a browser i get the redirect error. But if i update the site using WP-CLI the upgrade works without issue. Putting this here for the WP team. I now have quite a few broken sites though and the resetting the browser is only working some of the time.

    I’m having zero luck! One site immediately after the login page I get error 403 as it redirects to wp-admin/update-core.php. The other site I can log into the admin page but if I click update I get the exact same error 404 on wp-admin/update-core.php

    Update:

    On the site that I could get to the admin, I just updated with wp-cli and now I get the 403 immediately after logging in, I can no longer see any admin page. I’m using hostgator as my host if that’s of any help.

    • This reply was modified 1 year, 2 months ago by drbayless.
    Thread Starter Meagan

    (@mtruglio)

    Just discovered something else you might try. I walked away from my computer for 15 mins and then tried one of the broken sites again; it worked. Not sure it will for everyone, but this worked twice for me now. Plus it gave the added benefit of a short break ??

    Moderator Marius L. J.

    (@clorith)

    Are any of you using any security plugins or plugins that change the wp-admin directory in any way?

    Thread Starter Meagan

    (@mtruglio)

    We are using a WAF, but disabling it changed nothing. I was able to use a remote management tool along with WP CLI to get all my sites updated. But each time I logged in and updated one myself as described above, it locked up with the redirect error.

    Hey im having the same exact issues. looks like 6.3 is borked

    (credit where credit is due: This is the same answer as one given back in 2020, here: https://tech.yipp.ca/wordpress/fix-redirected-wp-adminupgrade-php_wp_http_refererwp-admin-login/)

    To get past this, I did the following:

    • Logged into my hosting provider (IONOS in my case) and used the database tool to get into the WP tables.
    • Opened the “options” table (at the bottom of all the tables, just before “postmeta”
    • sorted by the “option_name” field
    • found the “db_version” record and noted the “option_value”
    • Got into the website file system (using FTP, Filezilla, built-in file manager, or whatever)
    • Made a copy of /wp_includes/version.php
    • Edited version.php and changed the line for “$wp_db_version=” to match the version I found in the database

    At that point, I was able to get back into the WP admin panel and re-try the upgrades. I re-ran the 6.3 install and everything seems to have run clean.

    I having the same issue again and again. I always fix it by copy the db_version from database into the wp-includes/version.php. After that I can login as admin again.

    I have still no clue how to get rid of it. In addition I’m not sure if this cause by a plugin update or a wordpress update.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘upgrade.php is 404 after update to 6.3’ is closed to new replies.