How to migrate your wordpress from one host to another
I use to prefer to develop wordpress based websites for customers by directly installing and developing on the customers hosting server. Majority of the cases, especially for active websites, you cannot shutdown the websites while doing a re-design project.
However, to migrate a website from a demo site to live server is not a trivial exercise but you can make it fun following the steps outlined below:
I. Your Website is fully developed with all content and images. You are ready to move it to the production server.
II. You have installed wordpress version in the demo server that you will need at the production server. In this case, there is no need to re-install wordpress
Before you start:
a) Note the admin login and password used to get to the dashboard
b) Note the database connection information
1) Back up your database to an SQL file
a. You can use tools like Phpmyadmin to open the existing database
b. Select the database created for your demos wordpress
c. Select export, choose SQL
d. An SQL file will be generated
2) Change the demo server urls to the production Server urls
a. Using tools like Notepad++ or any other tools of choice replace all occurrences of your site example: demo.mysite.com to mysite.com. This could be hundreds of occurrences
3) Copy all wordpress installation from the demo server to the remote server
a. Use any FTP tool e.g. FileZilla to copy the all wordpress installation files to your installation folder. Example if your new server will be serving content on the parent folder(public_html) then copy all the files to this folder. If your new website will be installed in a subfolder example: /public_html/store. Open this folder and copy all the files
4) On the production server, create the database : Add user with desired privileges
5) On the production server, open the wp-config.php and update the credentials with the information created in Step 4
6) Go to your new installation website www.mysite.com the wordpress admin page will be opened. Login with your credentials and voila you are live!!