A simpler method I found is to open a MySQL dump in something like notepad ++
Then search and replace, for example http://www.oldsite.com , with http://www.newsite.com
then import the dump using php myadmin
Amendment
One of the main problems when moving a wordpress site from one domain to another is mainly related to any plugins or themes that store settings in the database.
The usual search and replace methods do not work, because some themes or plugins store data in a serialized format.
let's say in your theme plugin you have a setting called site home: site: http://oldsite.com '
Serialized it will be stored in the database as follows:
{s:9:"site-home";s:18:"http://oldsite.com";}`
Note s:** serialized array stores the string and the number of characters in the string
therefore, if you perform a standard search and replace as previously described
replacing http://oldsite.com to http://mynewsite.com
20 characters left now, not 18
However, the standard search and replace, as described above, will only update the matched string, the number of characters will not be updated.
serialized data will be changed to {s:9:"url";s:18:"http://mynewsite.com";}
This is what Wordpress interrupts because the data in the serialized array is now corrupted, as the number of characters is no longer correct.
The best tool, in my opinion, for migrating Wordpress sites is made by some guys at interconnect / it.
It checks serialized arrays and updates the number of characters as well as standard strings.
If you are migrating a wordpress site, this is the only tool you should use. and his free
search and replace Wordpress database