Skip to content

Instantly share code, notes, and snippets.

@gomako
Created April 17, 2014 13:36
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 gomako/10983965 to your computer and use it in GitHub Desktop.
Save gomako/10983965 to your computer and use it in GitHub Desktop.
MySQL Search and replace in wordpress database
UPDATE wp_posts SET post_content = REPLACE (
post_content,
'Item to replace here',
'Replacement text here');
@gomako
Copy link
Author

gomako commented Apr 17, 2014

I use it to replace any references to localhost once moved to the staging server.
From http://www.hongkiat.com/blog/how-to-search-and-replace-wordpress-in-blog-post/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment