seth
Jun 20th, 2009
Jun 20th, 2009
When Changing the Site URL in Wordpress Config…
You must remember that there are hard-coded urls all over word press. Here are 3 sql statements to update those urls:
- Update all post guids: UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain-name.com','http://www.new-domain-name.com');
- Update all post content: UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain-name.com', 'http://www.new-domain-name.com');
- Update all home and site_url options: UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain-name.com', 'http://www.new-domain-name.com') WHERE option_name = 'home' OR option_name = 'siteurl';