Thanks sXi !!
For the benefit of anyone reading the thread, I was able to make the site work last evening (till what is discussed in the thread; there might be some more challenges ahead). Here are some details if anyone is following this thread. Also, there is a possibility that a few things maybe out of sync since I have done these in bits and pieces and trying to remember the steps.
Few things to keep in mind …
From word press point of view, settings are exactly same on example.dreamhosters.com and example.com
Original site, say example.com, is still hosted at old ISP and nothing is changed there.
On Dreamhost, I have setup two parallel sites/folder structure
/home/example.dreamhosters.com - test site so I can see load time before hosting on Dreamhost, test plugins to ensure it does not mess up site looks etc.
/home/example.com - set by Dreamhost and future home of my main website once I move dns to Dreamhost
FTP client in use is FileZila though being a nix person, I use SSH whenever I can
Set up two database hosts (mysql.example.dreamhosters.com and mysql.example.com) and datbases
This is setup using: Goodies -> mysql databases
Created WP site structure, added posts and pages under "example.dreamhosters.com"
Note: I did a dump and load from old site but the site format looked a bit messed up. Given that the original site is not in WP and WP footprint is very small, I decided to recreate it.
With above in mind, following are the steps:
STEP 1. Copy Wordpress files (themes, plugins, etc.)
Copy everything from /home/example.dreamhosters.com to /home/example.com
a. Login to Dreamhost via SSH and do:
$ cp -rp /home/example.dreamhosters.com/* /home/example.com
confirm it worked; both of these should look same.
$ cd /home/example.dreamhosters.com/; ls -l
$ cd /home/example.com/; ls -l
STEP 2. Move MySQL data from “example.dreamhosters.com” to “example.com”
Option 1: SSH to Dreamhost and Dump and Load from nix cli (one step)
$ mysqldump -h oldhost -u oldusername -poldpassword olddbname | mysql -h newhost -u newusername -pnewpassword newdbname
- In this case, the “oldhost” and “newhost” are the same host - the name of Dreamhost server your domain is being hosted on.
If this worked, it will copy your entire data to the new db.
You can login to MySQL, pick a table and display something like
select * from
Option 2: Dump and load using PhpMyAdmin
a. Dump MySQL data from “example.dreamhosters.com” to your PC
Many ways to do this. One way is to directly login to phpmyadmin:
You want to export your db content (from all tables) into a .sql file.
- Userid/pass can be found in wp-config.php
- Screen shot and steps of Database export are same as: http://robcubbon.com/moving-wordpress-site-to-new-domain/
- You can edit this file in Notepad or Wordpad and really do all the search & replace of “example.dreamhosters.com” with “example.com” and then import this file to “mysql.example.com”. However, if your db is big, this can become a tiring process and you may miss something. I don’t recall now if Notepad and Wordpad has a feature that does global search and replace (i.e. once instead of prompting you to change every instance)
b. Upload .sql file to the root of your WORDPRESS site
Use FileZila or any ftp client to move .sql file from PC to Dreamhost to folder “/home/example.com”
You can probably also try this:
and import the .sql file. It might even pick the file from your PC. I didn’t try this but I am fairly sure it works.
STEP 3: Intial Testing of site (while dns is still not moved)
On my nix (linux/unix) host, I added Dreamhost DNS in /etc/resolv.conf, and in the browser pulled it as: http://example.com. It will pull the main page but none of the links will work for now ( you can howver on the categories and it will show still as “example.dreamhosters.com”)
STEP 4. Search and replace all instances of “example.dreamhosters.com” with "example.com"
For this, I used this tool:
Note: I am sure there are good WP plugins to do just that in a simpler way.
STEP 5. Login to your WP BACKEND and then visit your site from there
Note: I haven’t quite figured out this ritual. Maybe I need to empty cache used by WP Super Cache or any other cache plugins.
However, this does seem to “refresh” links. If I just pulled my site (example.com) on the nix host with temp dns, the links still showed from old “example.dreamhosters.com”.
NOTE: At this point, both “example.dreamhosters.com” and “example.com” should look exactly the same.
i.e. example.dreamhosters.com shows in any browser since it is on the internet. And “example.com” only shows on the PC on which you have set up the temp DNS.
- Move DNS from old host to new host
Some links I found/gleaned through (helpful if you are moving from godaddy to Dreamhost):