Moving a WordPress website to a new location/host
Tuesday, September 16th, 2008After copying files and db content:
- Edit wp-config.php with new db content
- edit .htaccess (if parent folder name of wp has changed)
- using phpMyAdmin (as instructioned in the above link)…
- update all absolute URLs to new domain eg.
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’; UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');