Find and Replace with phpMyAdmin

This will most definitely help developers who use a sub-domain while setting up a clients WordPress site; only to have to change all the image paths in WordPress by hand. What a pain! This quick tip will allow you to do a mass find/search and replace using phpMyAdmin.

  1. Open phpMyAdmin
  2. Select the database you want to edit
  3. Click “SQL” on the top tab
  4. Paste the following and change “replace_that” and “with_this” to meet you needs update :
`wp_posts` set `post_content` = replace(`post_content`, 'replace_that', 'with_this');