Move WordPress to new location or server, easiest way
When creating a site on WordPress there comes a point when you need to move it to production environment, to client's webhosting etc. Here is the simplest way of moving WordPress.
1. Copy all files to new server via FTP
2. Export database via phpmyadmin from a) old server and b) import to new server.
3. Log in to new server phpmyadmin and Change Home and Siteurl in database table wp_options to your new address (alternative methods to change siteurl).
4. Change image URLs. Perform a Find and replace on tables wp_posts and wp_postmeta . Search for your old base URL and replace that with your new base URL.
Click on wp_posts -> Search -> Find and Replace -> enter your old URL with http and new URL with http, do not include a trailing slash and select column post_content and then replace.
Click on wp_postmeta -> Search -> Find and Replace -> enter your old URL with http and new URL with http, do not include a trailing slash and select column meta_value and then replace.
WordPress stores your image urls as absolute not relative because the images can appear in more places than one page and they haven't figured out yet how to serve them via a relative URL.
5. Assuming you have the new database set up add connection parametres to wp-config.php on your new server.
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
6. Log in to admin http://yoursite.com/wp-admin and go to Settings -> Permalinks, and click Save - I've found this has to be done in order for the URL rewrites to work correctly if they were enabled in your testing site.
7. Go to Settings -> Media and change the media location to wp-content/uploads. Should work, if not, see for your full path from your hosting provider or FTP client and include that in here.
Ps, If you hard-coded absolute URLs in your template or CSS files you need to edit them manually. This is how I move my WordPress sites without installing plugins to move WordPress. Simple and works.