Skip to content

Instantly share code, notes, and snippets.

@mglaman
Last active December 17, 2015 20:49
Show Gist options
  • Save mglaman/5670530 to your computer and use it in GitHub Desktop.
Save mglaman/5670530 to your computer and use it in GitHub Desktop.
Migrating WordPress websites, changing guid for posts so attachments and routes have proper URL.
UPDATE wp_posts SET guid =
REPLACE(
guid,
"localhost/example",
"example.com"
),
post_content =
REPLACE(
post_content,
"localhost/example",
"example.com"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment