fuxt-backend icon indicating copy to clipboard operation
fuxt-backend copied to clipboard

Admin URL redirecting when moving to WP Engine

Open drewbaker opened this issue 1 year ago • 3 comments

We are trying to migrate a bunch of sites to WP Engine, and after the migration happens, if you try to access the admin URL, it redirects to the live site admin that is on Flywheel.

For example, the WP Engine dashboard links to: https://my.wpengine.com/installs/2738612/launch_wp_admin?account_id={some token here}

But it ends up at: https://api.makemakeentertainment.com/index.php?install_name=makemakeent&nonce={some token here}&rest_route=%2Fwpe_sign_on_plugin%2Fv1%2Flogin&user_email=drew%40funkhaus.us&x_request_id={some token here}

drewbaker avatar Feb 26 '24 01:02 drewbaker

So the question is, what code do we have in our theme that is redirecting to a the admin URL?

drewbaker avatar Feb 26 '24 01:02 drewbaker

The page that you end up on is JSON and says this:

{"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}

drewbaker avatar Feb 26 '24 01:02 drewbaker

The solution is to do a find-and-replace on the database to update old URLs. The important ones to change are the settings for siteurl and homeurl, but ideally all the ones in the database (like those used in post content to link to an image).

drewbaker avatar Feb 26 '24 20:02 drewbaker