If you’ve ever moved a WordPress site to a different domain then you know it is somewhat of a headache. First you copy over all of the files, then you create a database sql dump of your existing database and import it into the new location, make the necessary changes to the configuration file, and then probably curse when you realize that not all your plugins and themes are working correctly any more.

The problem is that obviously one has to do search and replace operations on the database to ensure that all references to the old domain is switched to the new domain, but given the different serialization storage formats used by various third party bits of code, well simply put, it is easier said than done.

Enter this fantastic database search and replace script written in PHP by the guys over at interconnect/it.

You simply download the zipped script, extract the folder to an area in your WordPress location, and then directly access the newly created folder via the browser – the slick AJAX-driven user interface asks you for the search and replace terms, gives you already filled in database connection information (it’s pretty good at picking this up from your WordPress install), and then lets you run off with either a dry run or live execution. Slick, painless and very effective.

Delete the folder when you’re done, though the script even offers to try and do it on your behalf as well! Well written, user friendly, and highly recommended for whenever you find yourself having to change domains for your WordPress site.


Related Link: Database Search and Replacement Script