Title: Find and replace in database
Last modified: August 19, 2016

---

# Find and replace in database

 *  [roamingk](https://wordpress.org/support/users/roamingk/)
 * (@roamingk)
 * [18 years ago](https://wordpress.org/support/topic/find-and-replace-in-database/)
 * Hi,
 * I recently moved from S9Y blog to WordPress. I did an import from an XML feed.
   Year 2 and 3 posts are perfect, however Year 1 posts are missing photos due to
   the way the XML feed was formatted. Quotation marks have been marked up as & 
   q u o t; *without the spaces* so any img src=”XXX.JPG” appears as img src= & 
   q u o t; XXX & q u o t;
 * Is there an easy way to “find and replace” this using PHP My Admin in the wp_posts
   table.. as this is not my forte..and I don’t really fancy having to edit 200 
   posts by hand. I know I could reformat the XML feed, but that would be just messy.
 * K.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Austin Matzko](https://wordpress.org/support/users/filosofo/)
 * (@filosofo)
 * [18 years ago](https://wordpress.org/support/topic/find-and-replace-in-database/#post-747281)
 * Yes, but as with every direct database operation, there is some risk, and you
   should have a backup already.
 * `UPDATE wp_posts SET post_content=REPLACE(post_content, 'src=&quot;', 'src="');`
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years ago](https://wordpress.org/support/topic/find-and-replace-in-database/#post-747287)
 * There is also a handy plugin named (you guessed) “search and replace”.
    [http://wordpress.org/extend/plugins/search-and-replace/](http://wordpress.org/extend/plugins/search-and-replace/)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Find and replace in database’ is closed to new replies.

## Tags

 * [find and replace](https://wordpress.org/support/topic-tag/find-and-replace/)
 * [importing](https://wordpress.org/support/topic-tag/importing/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/find-and-replace-in-database/#post-747287)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
