I've just migrated a simple Wordpress site from my usual host to my client's host. The root directory for the site used to be http://www.imagineelection.com/watamu, and now it's http://www.watamuturtles.com
The http://www.watamuturtles.com homepage loads fine, but all of the links on the page still point to the old domain. Clearly I simply need to change a setting somewhere.
But -- I can't login to the admin interface! When I login at watamuturtles.org/login.php, it redirects me to the login page at imagineelection/watamu/login.php. And when I login at imagineelection, it swaps me back to watamuturtles.
Clearly I need to manually change the base directory setting in a config file, or in the database, without access to the usual WP admin interface. Can anyone point me in the right direction?
These 3 sql queries always does the trick for me when migrating:
fixing site url:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
fixing absolute urls:
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
fixing internal linking in your content:
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
Simple way to migrate WordPress: first change: WordPress address (URL) and Blog address (URL) in the old blog's settings, pointing them to new URL, then export database and them import it to new blog.
I found this post to be helpful too: Replace all fields in MySQL
I did the following steps: