Skip to content

Instantly share code, notes, and snippets.

@szbl
Created June 28, 2016 18:13
Show Gist options
  • Save szbl/e2f1d5b2b64c73f4945c641df0117d3b to your computer and use it in GitHub Desktop.
Save szbl/e2f1d5b2b64c73f4945c641df0117d3b to your computer and use it in GitHub Desktop.
--
-- Update site options (URL redirect/permalinks)
--
UPDATE wp_options
SET option_value = REPLACE( option_value, 'http://www.apexcovantage.com', 'http://www.apexengineering.com' )
WHERE option_value LIKE 'http://%';
--
-- Update page/post content
--
UPDATE wp_posts
SET post_content = REPLACE( post_content, 'http://www.apexcovantage.com', 'http://www.apexengineering.com' );
--
-- Update any custom field content
--
UPDATE wp_postmeta
SET meta_value = REPLACE( meta_value, 'http://www.apexcovantage.com', 'http://www.apexengineering.com' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment