Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin URL redirecting when moving to WP Engine #79

Open
drewbaker opened this issue Feb 26, 2024 · 3 comments
Open

Admin URL redirecting when moving to WP Engine #79

drewbaker opened this issue Feb 26, 2024 · 3 comments

Comments

@drewbaker
Copy link
Member

drewbaker commented Feb 26, 2024

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
Copy link
Member Author

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

@drewbaker
Copy link
Member Author

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
Copy link
Member Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant