WordPress: database search and replace plugin
source: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
source: https://github.com/interconnectit/Search-Replace-DB
Search and Replace DB
This plugin helps you migrate a WordPress database by searching and replacing fields in the db.
steps:
- download the plugin from the github releases https://github.com/interconnectit/Search-Replace-DB/releases
- unpack it inside the wordpress main directory, where
wp-config.phpis - give proper permissions to the Search-Replace-DB-master directory
- optional: change directory name to something easier like SRDB
mv Search-Replace-DB-master SRDB - visit the link: https://YOUR.WORDPRESS.URL/Search-Replace-DB-master
- have handy:
- database name
- database user
- database password
- database location (URL or localhost)
- database port
- test the connection to the database
- search https://OLD.SITE.URL replace https://NEW.SITE.URL
- do a dry run first (wise)
- do the run and change any other parameters like:
* search http://OLD.SITE.URL replace http://NEW.SITE.URL
* maybe the location of
uploads:/old/path/wp-content/uploadsto/new/path/wp-conten/uploads* … - DELETE the Search-Replace-DB-master directory IMPORTANT
- DELETE the Search-Replace-DB-master directory IMPORTANT
- DELETE the Search-Replace-DB-master directory IMPORTANT
- and yes…
- DELETE the Search-Replace-DB-master directory IMPORTANT
Very important to not leave this code out in the public url.