Yesterday I came across a very handy PHP script for migrating WordPress between domains. When doing a search and replace you must use a safe search and replace method that preserves the integrity of the serialized string lengths. If you were just do to a normal search and replace on the database you would run into problems such as losing widget settings. This is because the length of the string changes, but the indexes for the serialized strings doesn’t.
No problem now though, using this script!
Simply visit the interconnect/it website and download the Search Replace DB script then upload it to your server and run it by visiting the URL, http://yourwebsite.com/nameofscript.php. There is instructions on the screen as you run through it.
This code is supplied with no warranty or support implied. You use it entirely at your own risk. Currently it is supplied under the WTFPL but this will change to the GPL eventually. And when you’ve finished using the script, PLEASE delete it as it can pose a serious security risk to your site.