Skip to content

Instantly share code, notes, and snippets.

@stoffl6781
Created January 8, 2021 00:19
Show Gist options
  • Save stoffl6781/a8713d8e63620e90b107487c426e1ce5 to your computer and use it in GitHub Desktop.
Save stoffl6781/a8713d8e63620e90b107487c426e1ce5 to your computer and use it in GitHub Desktop.
UPDATE `wp_posts` SET guid = REPLACE(guid, 'oldsiteurl', 'newsiteurl') WHERE guid LIKE 'oldsiteurl%';
UPDATE `wp_postmeta` SET meta_value = REPLACE(meta_value, 'oldsiteurl', 'newsiteurl') WHERE meta_value LIKE 'oldsiteurl%';
UPDATE `wp_options` SET option_value = REPLACE(option_value, 'oldsiteurl', 'newsiteurl') WHERE option_value LIKE 'oldsiteurl%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment