How to do find and replace using phpMyAdmin

The steps below show how to do a find and replace on the WordPress posts table using phpMyAdmin.

REMEMBER: backup your database before making any changes. You can do this by exporting the table or using the backup utilities in the cPanel.

  1.  Log into the cPanel for your website. The address is usually, and the username and password would have been provided by your host when you first joined.
  2. Under ‘Databases’, click on the icon for ‘phpMyAdmin’
  3. WordPress-StaticContent4
  4. Expand the database for the WordPress installation and click on the ‘wp_posts’ table
  5. WordPress-StaticContent5
  6. Click on the ‘Inline’ link, then in the text box enter the following command
  7. Replace ‘old string’ and ‘new string’ with the find and replace you want to perform
    UPDATE wp_posts SET post_content = REPLACE(post_content,
     'old string','new string')
  8. WordPress-StaticContent6
  9. Click ‘Go’ to apply the changes