Redirecting to old domain after migration

My issue is resolved, I am posting this as an answer so that someone else can benefit out of it.

My issue was, siteurl and homeurl were not updated, so I have placed define('RELOCATE',true); in my wp-config.php file. And again tried to access the website , it gone to the correct URL but all the CSS was gone.
Then I headed over to wp-admin and it also came with no CSS but still I tried to login but this time it has taken me to the correct URL and with CSS login page but didn’t log in. Then again I attempted to login and this time I was successful.
Then I changed both the URLs from settings in the admin panel.

After this you must to delete all your browser cache files to delete any kind of persistent redirection.

Hope this helps someone else dealing with the same problem.

Leave a Comment