Moving WordPress to a different domain

This is a quick not on how to move your WordPress site to a different domain. Usually this is no a task performed often, however as a developer you will have the need to do so on a regular bases when publishing a site.

This post is very quick writeup on how to do so. First step, obviously: fix the settings in wp-config.php . Next run the following queries:

UPDATE wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, '','');

UPDATE wp_posts SET post_content = replace(post_content, '', '');

That should do the trick. Off course change and to the appropriate values.