How to Find and Replace Text with One Click in your WordPress Database

1
2
update TABLE_NAME set FIELD_NAME =
replace(FIELD_NAME, 'Text to find', 'text to replace with');

For example, if you wanted to search for text in a WordPress post’s content, then you would write your query like this:

1
2
update wp_posts set post_content =
replace(post_content,'Text to find','text to replace with');

Click on the ‘Go’ button to continue.

PhpMyAdmin will run your SQL query and upon success it will show the number of rows affected by the query.