Plugin: Database Search & Replace
Extremly detailed article on manually searching and replacing.
Search-replace from command line
If you can install WP-CLI, superior way is to use WP-CLI
This is how you install it
cd /var/www/vhosts/hostingtipp.ch wget https://github.com/interconnectit/Search-Replace-DB/archive/master.zip unzip master.zip && rm master.zip && mv Search-Replace-DB-master srdb chmod a+x srdb/srdb.cli.php
And use it with
cd /var/www/vhosts/hostingtipp.ch srdb/srdb.cli.php --dry-run -h localhost -u hostingtipp-ch -p "S06d7#mw" -n hostingtipp-ch -s "http://www.hostingtipp.ch/wp-content/" -r "/wp-content/"
Search-replace with a plugin
Sometimes I need to do a lot of replacement, so a nicer way is needed - as a Wordpress plugin. So decided to do a research on this.
Also very flexible is Search Regex, but it doesn’t search in
wp_options table and probably not in any unknown plugin table, because it does not support serialized data.
Note: This is almost perfect plugin. Just read more here
The most famous one is Search and Replace but it’s incredible how shitty it is.
- The Replace Contents plugin performs search and replace on HTML content and is authored by my favorite Japanese minimalist developer.