Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save flowtwo/6651675 to your computer and use it in GitHub Desktop.
Save flowtwo/6651675 to your computer and use it in GitHub Desktop.
Search and replace WordPress domains in phpMyAdmin
UPDATE prefix_options SET option_value = replace(option_value, 'demo.com', 'live.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE prefix_posts SET guid = replace(guid, 'demo.com','live.com');
UPDATE prefix_posts SET post_content = replace(post_content, 'demo.com', 'live.com');
UPDATE prefix_postmeta SET meta_value = replace(meta_value, 'demo.com', 'live.com');
UPDATE prefix_term_taxonomy SET taxonomy = replace(taxonomy, 'demo', 'live');
UPDATE prefix_posts SET post_type = replace(post_type, 'demo', 'live');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment