Links after moving my site to another domain

See Moving WordPress « WordPress Codex

These are typical queries to run in phpmyadmin to change URLs, but you may also have serialized data in widget and theme options that will have to be changed, too:

UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name="home" OR option_name="siteurl";

UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');

UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');

And Search RegEx is a good plugin to be able to search and replace with Grep through all posts and pages to check if any URLs were missed.

Leave a Comment