Skip to content

Instantly share code, notes, and snippets.

@carlowens
Created October 23, 2014 23:04
Show Gist options
  • Save carlowens/78180b06cb2ee5b95eaf to your computer and use it in GitHub Desktop.
Save carlowens/78180b06cb2ee5b95eaf to your computer and use it in GitHub Desktop.
wordpress sql update domain
UPDATE wp_options SET option_value = replace(option_value, 'http://localhost:8888/', 'http://somesite.local/') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://localhost:8888/', 'http://somesite.local/');
UPDATE wp_posts SET post_content = replace(post_content, 'http://localhost:8888/', 'http://somesite.local/');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://localhost:8888/', 'http://somesite.local/');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment