I’ve written a very simple script that is built to do exactly what you’re talking about. Here’s the basic process you’ll want to follow.
- On the old server, log-in to PHPmyAdmin and export the database.
- On the new server, log-in to PHPmyAdmin and create your database. You may need to create a new MySQL user as well, but your web host should be able to assist you. Make a note of the database name, the MySQL username and password as well as the database host (usually localhost).
- Using PHPmyAdmin on the new server, import your old database into the new database.
- Using FTP, copy all of the files from the old server onto your computer.
- Open the wp-config.php file and enter your new database name, username, password and database host.
- Go to http://philipdowner.com/2012/01/script-to-make-wordpress-site-migrations-easier/ and download the wp-migrate.php script. Place this in the root of your WordPress site.
- Upload the site and all of it’s files (included the wp-migrate.php) file to your new server.
- Point your web browser to http://yournewdomainname.com/wp-migrate.php and follow the directions in the script.
- The script will update all instances of the old URL in the database for you.
If you need further help, there’s a couple of great threads here on this forum. Also see the Codex article on backing up your database.