By
07/02/2016   Comments Off on How to do a search and replace in phpMyAdmin for WordPress

View all snippets

mysql

Find the SQL tab and paste the following in the command box.

In the example below, I’m searching the WordPress table post_content to find and replace something. Change the information between the quotes ‘Item to replace here‘ with what you want to find and change the information between the quotes ‘Replacement text here‘ with what you want to replace. Then click “Go.”

UPDATE wp_posts SET post_content = REPLACE (
post_content,
'Item to replace here',
'Replacement text here');

Note: Depending on your WordPress setup, your wp_posts may have a prefix, like abc_wp_posts but normally the first is the default name of the table. However, post_content doesn’t change.