Skip to content

Instantly share code, notes, and snippets.

@cameronbaney
Last active December 14, 2015 01:29
Show Gist options
  • Save cameronbaney/5006522 to your computer and use it in GitHub Desktop.
Save cameronbaney/5006522 to your computer and use it in GitHub Desktop.
SQL to migrate WordPress site
UPDATE wp_options SET option_value = 'http://www.newsite.com' WHERE option_name IN ('siteurl', 'home')
UPDATE wp_posts SET post_content=(REPLACE (post_content, '{old url}','{new url}'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment