Skip to content

Instantly share code, notes, and snippets.

@tux255
Created February 22, 2019 09:20
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 tux255/b20467e0b6cc7e01b49a9d8128602b2b to your computer and use it in GitHub Desktop.
Save tux255/b20467e0b6cc7e01b49a9d8128602b2b to your computer and use it in GitHub Desktop.
Wordpress links replacer
UPDATE ac_options SET option_value = replace(option_value, 'http://to.replace', 'http://placehold.er') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE ac_posts SET guid = replace(guid, 'http://to.replace','http://placehold.er');
UPDATE ac_posts SET post_content = replace(post_content, 'http://to.replace', 'http://placehold.er');
UPDATE ac_postmeta SET meta_value = replace(meta_value,'http://to.replace','http://placehold.er');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment