Just moved a WordPress site from one host to another, site domain also changed.
Reference article from WP Docs: http://codex.wordpress.org/Moving_WordPress
What I’ve successfully done:
Download the whole site files and put into new host directory.
Export the database, create a new database in new host and import all the data.
setting database info: db_user, db_password, db_host, db_name ( if anything is changed )
You can skip step 3 if you will do the step 4.
Go to the new database
Open wp_option table, find ‘siteurl’ and ‘home’, change the old url to new one ( note: ‘http://’ must be included in the url )
Replace database table old url ( Only perform a search and replace on the wp_posts table. )
using this tools, recommended by WP docs: http://interconnectit.com/products/search-and-replace-for-wordpress-databases/
very easy to use. copy the php file into root directory and run it.
The site should be working now.
But when click any page, I got a 404 error then. Can’t find index.php. Permanlink is not working. It all works fine if I change the permalinks to their default setting (Wp-Admin> Settings> Permalinks).
That’s because of .htaccess file. Comment all the old rewrite rules and change the permalinks setting again, should be alright!
That’s all. Hope this will be helpful to everyone.