The Way I Transfer My WordPress Blog To Another Host

by Yan Susanto on April 28, 2008

OMG! I did it. I was very nervous in the beginning as this was the first time I attempted to transfer this blog which was hosted in another subdomain to a brand new current domain and a new host. I did google to find the guide to do the transfer but none really convinced me to D-I-Y except one Cormac Morlan’s How to transfer your WordPress blog from one host to another host.

Well, the fact that I could just fresh install the WordPress into my new domain and redo everything, I decided to take the risk and experience first hand the transfer process. Using Cormac’s method, this blog is transferred painlessly and successfully. So I thought I should share with you how I did the transfer myself in 5 easy steps.

So here’s the process..

1. Export (back up) your WordPress database

There are many way you could back up your WP database, for the purpose of this how-to, I would highlight the use of phpMyAdmin to do the task. If you are unsure what phpMyAdmin is. It is a web-based admin area for you to manage your database. Usually found under ‘Databases‘ section when you go to your domain cpanel – www.domain.com/cpanel.

Once you have successfully login to the phpMyAdmin, click on the name of your WP database. You would by now see the top navigation tab. Click on the Export button and tick the following as instructed by Cormac:

  • click on ’select all’ and ‘SQL’ from the Export menu
  • select ‘add Drop Table’, ‘add Auto_Increment value’ and ‘enclosure table and field names with blackquotes’ from the Structure menu
  • select ‘Complete inserts’ and ‘Use hexadecimal for binary files’ from Data
  • you can leave all the other values at their defaults

Once done, choose “Save as file” and this will save and download your WP database .sql file to your desktop.

2. Create a new WordPress database

When you are done with the above, go back to your cpanel and click on the MySQL Databases. Creating a new database can be done in 3 simple steps:

2.1 Choose the name of the new database and click Create Database

2.2 Add New User. This is self-explanatory. Create a new username and password.

2.3 Add User To Database. Assign the user to the new database created in step 2.1.

3. Edit wp-config.php

Important: This is extremely important. You need to edit the file to change the old database configuration to the one you just created in step 2. The step is required to instruct WordPress to access to your MySQL database you define.



// ** MySQL settings ** //

define('DB_NAME', 'putyourdbnamehere');    // The name of the database

define('DB_USER', 'usernamehere');     // Your MySQL username

define('DB_PASSWORD', 'yourpasswordhere'); // ...and password

4. Download & upload ALL WordPress files & folders

This is pretty straightforward if you know how to use any of the FTP software for upload and download. So for the sake of simplicity, I would not elaborate more here as I assume you already know how to FTP those files. Just remember that you need to upload ALL your WP files & folders including those plugins and themes folders to your new directory.

5. Import (upload) the previously backup database

Here’s the easy part. Since you already know how to Export via phpMyAdmin. You just need to reverse the process by choosing the Import to upload your .sql file and you are done.

That’s all you need to do and by now you should have successfully transferred your WordPress blog to a new host. Just like I did it.

Here I would like to stress the point that I am not an expert but I’m sharing this as a goodwill. Therefore if you encounter any problem during your migration, you can refer to Corman Morlan’s site for reference and further reading or WordPress Support Forum for assistance.

If you do transfer your WordPress blog using the above guide, please do drop me a line on the comment section and tell me whether the above step is applicable to you. On a side note, I would like also to know if there is an alternative better way for me to do the migration or have I missed any point here?

Related posts

Sponsor of The Month

{ 12 comments }

Cormac Moylan April 28, 2008 at 3:41 am

Hi Jan, glad my guide helped you out.
It’s Cormac Moylan btw ;)

Yan April 28, 2008 at 3:46 am

@Cormac
Thanks for dropping by. Yeah it did help me especially on the part where I back up my database. Thanks!

StuckS May 8, 2008 at 12:36 am

So you also just moved to your new hosting..
:D.

Yan May 8, 2008 at 12:56 am

@StuckS

Oh yes, I’ve just moved over to a new hosting. Whilst I was preparing for this blog I hosted it on temporary server, did some tweaking to the theme and launched it on a new server.

Thanks for dropping by and good luck to your blog.

Technology For Non Techies June 14, 2008 at 3:32 am

Great tutorial Yan. Thanks to Cormac Moylan too for the inspiration. This definitely may come in handy some day. Do you reckon that performing step 1 on a regular basis is the best way to backup your blog entries? No doubt there are probably plug-ins which automate backups.

Technology For Non Techies’s last blog post..What the Heck Is “YouTube” Anyways?

Yan June 14, 2008 at 4:10 am

Hey Colin,

Thanks for dropping by. I automate the process of backing up my blog using WP Database Backup and have it set to email me on a weekly basis. Everything works behind the scene.

I’d strongly recommend it to you if you haven’t had one for your blog.

PS: Colin, what do you say if you grab yourself a Gravatar?

Mike July 13, 2008 at 6:33 am

Worked perfectly! Thanks for the help.

Yan July 13, 2008 at 11:31 am

@Mike: Glad that it is of help to you. Thanks for dropping by, Mike.

jayl December 2, 2008 at 1:02 am

thanks for this.. i think i did it correctly… will wait for another two days.. this is a great step by step guide, combined with Mr. Cormac Moylans’

cheers,
jayl

jayl´s lastest post..Myth: Good Domain Names Are Already Taken

Jason January 22, 2009 at 5:33 am

This is an excellent guide for the most part. My only suggestion has to do with the permanent link destinations. I found that after transferring my blog according to your guide, everything looked okay, but post URLs were still pointing to the old URL. An excellent fix for this is located here: http://codex.wordpress.org/Changing_The_Site_URL.

Thanks much for the help. Lifesaver.

Jason´s lastest post..Grand Opening: The Book of Mammoth (And the Honest Scrap Award)

Cessy August 22, 2009 at 4:50 pm

Hi! Thank you so much for your tutorial here. It’s a life saver! I was able to migrate a few of the blogs I look after. I’m not very techy but I understand a bit since learning wordpress about 2 years ago. I used to be scared of touching the phpMyAdmin part but after a few unsuccessful attempts with the WP Import-Export, I thought I should learn how to migrate using phpMyAdmin. Thank you so much!

Rodney Hutcheson October 19, 2009 at 5:52 am

Thanks Yan…I was missing one little step which was the edit wp-config piece. After updating that everything went across seemlessly and my blog is back up and running perfectly and using a much cheaper hosting site as well.

{ 2 trackbacks }

Previous post:

Next post: