wordpress wp-login.php?redirect_to wrong path

This is a weird one. I googled for hours but seems to me not a single person has this same issue.

I moved my website from http://www.domain1.com/wpfolder to http://www.domain2.com . Everything works fine except I cannot get the “wp-login.php?redirect_to” path to point to the correct url.

Read More

WordPress keeps setting it to:
“wp-login.php?redirect_to=http://www.domain2.com/wpfolder/wp-admin&reauth=1”

It should be setting it to:
“wp-login.php?redirect_to=http://www.domain2.com/wp-admin&reauth=1”

The “wpfolder” doesn’t exist anymore..

I followed the instructions exactly on how to move a WordPress website, but the darn URL won’t change…

Some forum mentioned changing the “site_url” and “home” from “http://www.domain2.com” to “http://domain2.com”. Now I can finally get to the admin panel, but I don’t get why it needs to be that way?

I cleaned my browser cookies and checked the wp-content folder for cache already. Nada..

Also the rest of the site is functional.

I would appreciate if anyone can help.

Related posts

Leave a Reply

2 comments

  1. I moved the WordPress website from GoDaddy to Bluehost by copying the files and the database and the problem went away. I am not sure why this fixed it, but assuming it has something do with the cache.

    If anybody has more information, I would love to read about it.

    Thanks

  2. I was facing the same issue, with same redirection to one of the sub-directory in which wordpress was installed.
    Resolved this issue, by clearing the cache, if some cache plugin is active.
    Or by deleting the cache plugin if any present and is currently not yet active.
    As some entries made by cache plugin inside wp-config.php file creates the above mentioned problem.
    After removing the cache plugin, it resolves the WP-admin URL issues.