I had to do this today and it worked so thought I might as well record what I did for posterity. It might help somebody out.
To give some background, I had a WordPress site running the E-commerce plugin on one domain and wanted to create a duplicate of the site onto a different domain.
Here is what I did:
1. Copy the entire wp-content directory from "www.old-domain.com" onto my desktop. This directory contains theme files, plugins and uploads.
2. Download a copy of the .sql file containing ALL the Wordpress tables from "www.old-domain.com". Since I was running the WP-DB plugin it was a case of just going to my email box and finding the most recent tarball copy of the database that the system sent to me. Downloaded this and unzipped it on my desktop. You could do the same thing with CPanels backup facility. Talk to your hosting company if you are unsure.
After steps 1 and 2 you now have all the raw material you need to re-establish you blog on it's new home.
3. Go to "www.new-domain.com" and install a fresh Kubrick themed installation of WordPress. In my case I was able to use my hosting company's Simple Scripts to do a fresh WP install in a matter of minutes.
4. Delete the existing wp-contents folder in "www.new-domain.com" and upload the wp-contents from your desktop. Now log into your WordPress dashboard.
You should see all your plugins from "www.old-domain.com" and all your themes as well. Go ahead and activate all your plugins and activate whatever theme you were using in "www.old-domain.com"
NOTE: At this stage your login will be whatever WP login password you were given for "www.new-domain.com" when you did the fresh install.
5. Go to your hosting company CPanel in "www.new-domain.com" and look for the phpMyAdmin icon. This is an awesome tool for poking around in your databases. Open it up. In the top left you will need to locate your database. If it is a fresh domain it will probably be the only one. It might say "_wrd01" or something like that.
Make sure it is the right database! Down the left side you will see a list of tables. Click on the table that says "wp_posts". You should see a "Hello World" post and that's about all. It means you have the fresh database. You are going to now overwrite this.
6. Go to the phpMyAdmin tab titled "Import". Use the file browse field to find the unzipped sql file from step 2 on your desktop. Import it. Some people might recommend dropping all your database tables first. But any existing tables will be overwritten by tables of the same name so its probably unnecessary in this context.
7. This next step might look a bit scary but its not really that bad.
Click on the phpMyAdmin tab titled "SQL".
Enter the following commands (replace with your relevant domain names) and click Go.
Code:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
then enter this (replace with your relevant domain names) and click Go.
Code:
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
finally enter this code (replace with your relevent domain names) and click Go.
Code:
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
8. Check your "www.new-domain.com" front end. All your blog posts from the old site should be there. If you have some hard coded absolute links in your sidebar widgets or footer (as I did) you might need to amend those. Remember that to log into your WP Dashboard now you will be using whatever the login was at "www.old-domain.com". At least until you decide to change it.
9. Crack open a beer. You are done!
NOTE:In the examples we have seen how it works transferring from a the root folder of one site to the root folder of another site but exactly the same process will still work with sub-folders. For example you could substitute "www.old-domain.com/myfolder" and "www.new-domain/yourfolder" into the above examples.
I am not saying this is the best practice way of doing this but it worked for me. Wiser individuals might see otherwise.
Credits to My Digital Life where I gleaned most of this information
http://www.mydigitallife.info/2007/1...n-or-location/