How to transfer a blog from host to host.

Posted on October 14, 2008 by christoph

It’s really simple, but take it slow.

I first have to give props to Katy, she went above and beyond here, so this by no means is a cut to her.

Over the past couple years I have purchased 50+ websites, and now 3 Blogs.  It’s kind of like my little hobby, buying them, trying and turning them around and see if I can get them to grow.  Some do, some don’t.  Before the blog revolution, it was simple, a domain name, and some content and your have a site.  Now with blogs there is a lot more that goes into the transfer of a blog than many might thing. As this is rather a huge topic, I’m going to break it up into 3 parts, well here is the first piece.

Hosting

Probably the biggest thing involved.  While the current owner has found a suitable web hosting company for their site, you have probably found another hosting company to host you site, while this doesn’t inherently cause a problem, choosing to move the site does.  As the move requires some time to make sure you are ready to move the site, and if you have all of the necessary backups needed.

When choosing to move your blog from one hosting company to another, you need to especially make sure that you have a current backup of your blog, to do this you must login to your cpanel, through your hosting company, and follow the simple instructions listed below:

Begin by clicking database in your phpMyAdmin panel.


You may have several databases. Click the one that holds your WordPress data, the database you created when you installed WordPress.

This shows only default tables. You may have more tables — this would happen if you have any statistics plugins or anti-spam plugins.

  1. Select ONLY those that hold your Wordpress site.
  2. Check the “Add DROP TABLE” box.
  3. Check the “Complete inserts” box.
  4. Check the “Save as File” box
  5. Check the “None” for compression. If your database is very large use a compression method.
  6. Click Go. The data will now be saved into your computer.

Keep these files safe !

No this part will take a while depending upon how large or small your database is, once youe done you will hae your entire database in a nice and neat Notepad file.  Once you are ready to beging installing the file to the new location siply follow the following steps. (this is much easier)

  1. Login to phpMyAdmin.
  2. Select the database you wish to use.
  3. On the navigation bar on the top select “SQL” (besides Export, Structure, Search, Query… etc.)
  4. You should now be presented with a little page which allows you to run SQL query/queries on the database – Either by inputting the query/queries to the input box or by locating a text file on your computer.
  5. You now have 2 options: 1) Paste the SQL which you backed up earlier in the “Input Box” and click “Go” or 2) If you saved the file on your PC then use the option below the first one; Click Browse > Locate the File > Click “Go”. (Note: Most servers set a “Max File Size” for uploading the SQL, the size appears beside the Browse button.)\
  6. It may take sometime for the file to be uploaded and fully run, so give it a chance! Once it worked, it will bring you back to the same page and should confirm if all went well “Your SQL-query has been executed successfully: The content of your file has been inserted.”Congratulations! If all went well, you have successfully restored your backed up database!

Now if your sql file happens to be larger than 10MB you will most likely need to use SSH in order to transfer the database.  Here is how to do this.

Note: Some hosts do not offer SSH access, I suggest contacting your host and asking them if SSH access is enabled and if so the details. I had to fax a copy of my drivers license in order to get access to SSH it only took a min to fax it over and once it was received I had access. .  A good program to use for connecting via SSH is PuTTY (Get it at: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.) Don’t know how to use it? Search on Google for a tutorial.

Connect to your host via SSH, login & run: mysql -u user -p dbname < {path}/backup.sql

You will be asked to type out your password once you run that command, do so & click enter. It may take some time for it to respond, but once completed you should be brought back to where you started (bash/command line).Congratulations! You have successfully restored your database using SSH.

Hopefully i covered everything you will need, in the next part I will out line the essential items needed to complete the transfer.

I believe I have covered everything? Anything I missed? Comments or suggestions? Just let me know! Hope this tutorial was as useful to you as it is to me!

© 2008 I’m Blogging That!. All rights reserved. ColorMatic Theme by Theme Wars.