Skip to content

Instantly share code, notes, and snippets.

@coopy
Created May 22, 2016 19:07
Show Gist options
  • Save coopy/b3d626798e07aae8e78cd3be53aac733 to your computer and use it in GitHub Desktop.
Save coopy/b3d626798e07aae8e78cd3be53aac733 to your computer and use it in GitHub Desktop.
UPDATE wp_options SET option_value = replace(option_value, 'http://old.com', 'http://localhost:8888') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, 'http://old.com', 'http://localhost:8888');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://old.com', 'http://localhost:8888');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment