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

Published on August 15, 2012


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

](https://mhotspot.com/blog/solved-website-with-www-added-not-loading-but-the-url-without-www-still-loads/)

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.

  1. So we need to update them inorder to make the blog know that it’s on a different host/location.
  2. There are two ways of doing it. Using phpmyadmin and wordpress.
  3. 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).
  1. It will redirect you to the old location (assuming you still have the files in that location).
  2. After login succeeds, go to Settings > General.
  3. Change the wordpress url and site’s url to the current wordpress installlation directory.

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



← All blog posts

All rights reserved mhotspot.com