Categories
programming

How to search and replace all wordpress posts using phpmyadmin

Today I had to replace an specific text that was repeated on many of our blog posts. Fortunately there is an easy way to search and replace everything automatically.

First open your blog database on phpmyadmin and select SQL tab

 

Copy the code bellow and replace the text between the quotes with the desired text to be searched and replaced.

UPDATE wp_posts SET post_content = REPLACE (post_content, "text to replace here", "new text here");

Press go and the task will be done automatically.