Moving a wordpress installation to another Domain the “easiest” way: Use SQL statements! If you move your wordpress for example from a development server to a life/customer installation you first need to compress/zip your installation and put it to the destination server. Backup your database (you may use the mysqldump command) and put the installation on the new server.
The following steps are relevant if you work on console/shell, you may use phpmyadmin or sqlbuddy instead
Export the Mysql Database of your WordPress installation:
mysqldump -u YOURUSER-p --databases YOURDATABASE > DatabaseFile.sql
Setup the database and user on the new Server for your WordPress installation:
CREATE DATABASE YOURDATABASE; GRANT ALL PRIVILEGES ON YOURDATABASE.* TO 'YOURUSER'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
Once installed, you need to change the database domain settings in your wordpress configuration. You need to change the URL (Domain) and probably the path to the domain. (PATH)
UPDATE wp_options SET option_value = replace(option_value, 'www.old-domain.com', 'www.new-domain.com'); UPDATE wp_options SET option_value = replace(option_value, '/OLDPATH/', '/NEWPATH/'); UPDATE wp_posts SET post_content = replace(post_content, 'www.old-domain.com', 'www.new-domain.com'); UPDATE wp_posts SET guid = replace(guid, 'www.old-domain.com', 'www.new-domain.com'); UPDATE wp_postmeta SET meta_value = replace(meta_value, 'www.old-domain.com', 'www.new-domain.com');
thats it, your wordpress domain should have been moved successfully – good luck and have fun!
P.S.: there are some other informations about moving a wordpress site in the wordpress codex.