Skip to content

Instantly share code, notes, and snippets.

@szbl
Created October 8, 2014 15:30
Show Gist options
  • Select an option

  • Save szbl/f3db479cf234ac141fbb to your computer and use it in GitHub Desktop.

Select an option

Save szbl/f3db479cf234ac141fbb to your computer and use it in GitHub Desktop.
--
-- Basic update for site URL, does not update hard-coded content URLs but
-- should update properly generated permalinks and the basic site settings.
--
UPDATE wp_options
SET option_value = REPLACE( option_value, 'http://www.oldhostname.com', 'http://www.newhostname.com' )
WHERE option_value LIKE 'http://%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment