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.
- Open phpMyAdmin
- Select the database you want to edit
- Click “SQL” on the top tab
- 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');