Moving WordPress Blog from Cpanel to Dreamhost

by jacaranda on May 18, 2010

I recently move my personal blog about my kids from a cpanel-type webhosting interface to Dreamhost’s own webhosting management dashboard, or something. Recently, meaning today.

Anyway, Matt-and-Sean.com is a stale blog that is supposed to be a photo journal of my boys but because of the webhosting’s storage constraint, I need to move it to my Dreamhost account which has unlimited bandwidth and storage.

I’ll be posting here how to move your WordPress blog from a cpanel webhosting to Dreamhost. But the main purpose of this blog post is a single tip on the mysql prefix thingy…

Basically, before you do anything, download/backup your original files from the cpanel webhosting company that you are in… in my case, I opened up matt-and-sean.com/cpanel went to the Backup section and downloaded the database.. That’s the file with an “sql” extension.

Also you can download and backup wp-content directory.. since it contains all your themes, plugins and all those previously uploaded pictures… if you don’t do it, the images from your previous posts wont show up… now that’s sad.

Here are the quick and dirty steps, and I wont put the details here.. If you stumble upon a problem, and you need the info, you can contact me for other details… Dont.

1. From matt-and-sean.com’ domain registrant (it’s from marvin’s web.. another story.. i dont want to tell you the hassle i’ve been through for it to be ‘released’), change the DNS setting to the one that Dreamhost is using, that is ns1.dreamhost.com, ns2…..

2. Setup matt-and-sean.com in Dreamhost.. You’ll just basically clicking “manage domains” –> “Add New Domain/Subdomain” and filling up the required information

3. Once that’s done, wait a couple of minutes to an hour until the whole internet knows the new matt-and-sean.com.

4. From Dreamhost’s dashboard, there’s this “One-Click Install” features which makes the 5-minute official WordPress installation guide to 2 minutes or less! I tell you, some people (I wont say people from PLRPro.com) even sell the idea to their members.

5. Before you can install WordPress, you will be required to make a user name for the database of even a database. Then after that, you’ll have a new and shinny wordpress blog with a “hello world” post in it.

6. Next, get your old blog up. Go to Database and click on the phpadmin..and import your original sql file.

7. Here’s the tip.. after importing, you may still wonder where’s all your post? Why is it only the “Hello World” post showing? Here’s the deal.

That’s the database tables that Dreamhost created automatically.. (before you import) .. after you import it will add the original/old database tables with different prefix!

That’s why matt-and-sean.com still displays the Hello World post even though my whole blog is in the database already..

What you need to do is to tell WordPress to read the newly imported database and not the one that Dreamhost autoinstall created.

How is that? By editing the wp-config.php file:

Simply edit the line to read wp_ (or whatever it is that your old blog was configured), save the file and you’re done!

Last thing, remember to use your old username and password.. remember, you’re using your old database!

That’s it, enjoy!

Previous post:

Next post: