Skip to content

Instantly share code, notes, and snippets.

@Luxato
Created June 18, 2019 08:30
Show Gist options
  • Save Luxato/a635abacf26fed27e60ca2e5cafb8736 to your computer and use it in GitHub Desktop.
Save Luxato/a635abacf26fed27e60ca2e5cafb8736 to your computer and use it in GitHub Desktop.
Fix Wordpress DB after moving to new domain
UPDATE wp_posts SET guid = REPLACE(guid, 'olddomain.com', 'newdomain.com') WHERE guid LIKE 'http://olddomain.com/%';
UPDATE wp_posts SET guid = REPLACE(guid, 'olddomain.com', 'newdomain.com') WHERE guid LIKE 'https://olddomain.com/%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment