Skip to content

Instantly share code, notes, and snippets.

@wesleybliss
Created November 8, 2012 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wesleybliss/4041103 to your computer and use it in GitHub Desktop.
Save wesleybliss/4041103 to your computer and use it in GitHub Desktop.
WordPress Update Site URL
SELECT option_value
FROM wp_options
WHERE option_name = "home"
OR option_name = "siteurl"
LIMIT 1;
UPDATE wp_options
SET option_value = "http://newlink"
WHERE option_name IN ("home", "siteurl");
UPDATE wp_posts
SET post_content = REPLACE(
post_content,
"http://oldlink",
"http://newlink"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment