[Solved] WordPress site/blog redirects to old url/address on login after moving to new host/location

This is one of the problem I faced after shifting my website to a new host.
Read the other one: domain with www not loading

Ok, let’s see what is the reason.
1. What really happening is  , when the wordpress installation files and database are moved from one host to another,
the old settings/values actually remain in the database.
2. So we need to update them inorder to make the blog know that it’s on a different host/location.
3. There are two ways of doing it. Using phpmyadmin and wordpress.
4. Usually I don’t prefer phpmyadmin because its complicated.

So, let’s do it in the easy way:
(if you don’t have your wordpress installation in the old location read this topic)
 1. Login with your details into wordpress (new location).
2. It will redirect you to the old location (assuming you still have the files in that location).
3. After login succeeds, go to Settings > General.
4. Change the wordpress url and site’s url to the current wordpress installlation directory.

Ex: http://mhotspot .com/new/blog —-> http://mhotspot.com/blog/

Leave a Reply