Other than uploading your wordpress sites to the new domain, you will need to do some changes in your database. Therefore, when you want to move the wordpress website to a new domain, you will find out that existing database records are still pointing at the old domain. So how do we properly migrate our wordpress site to the new domain name?
I have seen a lot of developers going straight to the database and updating records to a new domain. Some just write update queries to change the domain. Usually they end up with corrupt wordpress site - which may not be functioning. If you are lucky the site may be still working but you may experience other issues with the website later on.
So what makes changing the wordpress domain so complex? And is it really such a big deal? Not really - the answer lies in serialised strings in the database. Because you cannot manually modify serialized strings, you will need a script to do this for you.
After searching I found out some useful script that will help you replace all occurrences of the old domain to the new one.
Follow these steps for proper migration of your wordpress site: