Title: Find/replace within option values with SQL in phpmyadmin
Last modified: August 19, 2016

---

# Find/replace within option values with SQL in phpmyadmin

 *  [Mark Ratledge](https://wordpress.org/support/users/songdogtech/)
 * (@songdogtech)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/findreplace-within-option-values-with-sql-in-phpmyadmin/)
 * What’s the correct query to find and replace options values? I need to find/replace
   a bunch of URLs in option_values of an option_name called widget_text
 * I changed all URLs in options with this:
 * `UPDATE bierken_options SET option_value = replace(option_value, 'http://www.
   olddomain.com', 'http://www.newdomain.com') WHERE option_name = 'home' OR option_name
   = 'siteurl';`
 * but that didn’t get the widget text, and Search Regex doesn’t pick up the widget
   text, either.

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/findreplace-within-option-values-with-sql-in-phpmyadmin/#post-1649712)
 * Looks like you didn’t include ‘widget_text’ in your list of option_name clauses.

Viewing 1 replies (of 1 total)

The topic ‘Find/replace within option values with SQL in phpmyadmin’ is closed to
new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/findreplace-within-option-values-with-sql-in-phpmyadmin/#post-1649712)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
