Skip to content

Instantly share code, notes, and snippets.

@richardevcom
Created August 31, 2020 00:54
Show Gist options
  • Save richardevcom/3b33efff5c4cabcf9ce84fade211a788 to your computer and use it in GitHub Desktop.
Save richardevcom/3b33efff5c4cabcf9ce84fade211a788 to your computer and use it in GitHub Desktop.

Revisions

  1. richardevcom renamed this gist Aug 31, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. richardevcom created this gist Aug 31, 2020.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
    UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');