Title: Search and replace string into the database
Last modified: November 24, 2021

---

# Search and replace string into the database

 *  Resolved [sinergyinaction](https://wordpress.org/support/users/sinergyinaction/)
 * (@sinergyinaction)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-string-into-the-database/)
 * Hi
    what sql command can I use in phpmyadmin to search for a “string1” in all
   tables of a WP databse and replace it with “string 2”?
    -  This topic was modified 4 years, 5 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Everything else WordPress
      topic

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

 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-string-into-the-database/#post-15096998)
 * you can use the plugin [https://wordpress.org/plugins/better-search-replace/](https://wordpress.org/plugins/better-search-replace/)
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-string-into-the-database/#post-15097287)
 * or, if you prefer the command line, use wp-cli.
 *  Thread Starter [sinergyinaction](https://wordpress.org/support/users/sinergyinaction/)
 * (@sinergyinaction)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-string-into-the-database/#post-15119026)
 * Thank you both for the leads!

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

The topic ‘Search and replace string into the database’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [sinergyinaction](https://wordpress.org/support/users/sinergyinaction/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/search-and-replace-string-into-the-database/#post-15119026)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
