ell, it is that time of the year again when I have to renew my hosting. A friend of mine recommend a hosting company which offers more features than what I am currently getting for less money. So I’ve decided to pack my bags as they say, and leave one home to go to another. Now the problem is that I don’t want to waste all the time I’ve spend in developing the site, so I need to move it.
I thought that during this time I would write down a guide on how to backup a wordpress site and then how to deploy it to another host.
The hosting company I have moved to is http://www.tsohost.co.uk/
I am going to refer to my existing hosting as ‘source host’ and my new hosting as ‘destination host’ to simplify things. I am also going to be using FTP because both companies do not offer SSH Access with the packages I have.
I recommend that you first buy your destination host package so that while they are sorting out your order and dns (which took ages for me, no fault of tsohost!) you can prepare things on your source host.
Step 1: Backup your website files
On the source host, access your website via FTP using an FTP Client. For Windows users I recommend Filezilla. You need to download everything that is in your www folder (can be called http_public) into a folder on your computer. This might take some time depending on the size of your website.
Step 2: Backup your website database
On the source host, access phpMyAdmin, most linux hosting packages use CPanel and phpMyAdmin will be an option on there.
Click on the database name
Then click on the Export tab.
Make sure that SQL is select on the left, and then the following are ticked:
- Add Drop table …
- Auto Increment
- Enclose table and field names with backquotes
Select the Save As File option. Then click Go.
It will then download a .sql file. Save this outside of the folder where you saved your website to.
Step 3: Creating your new database
Hopefully you will have login details for your destination host by now. Login to your control panel for the destination host and select phpMyAdmin.
You need to create a new database and a username/password to access this database.
Once you have done this you need to select your new database and then click Import tab.
Browse for your *.sql file that we downloaded earlier. Then click Go. A message should then appear saying that xx number of rows were imported successfully.
Step 4: Uploading your website files
Use your ftp client again (filezilla) to connect to your destination host. Copy all of the files in the website folder. Do not copy the folder but the contents of the folder.
Once that is complete you are nearly done. Just one more thing to do. There is a file in your www called wp_config.php. Open up this file in a text editor and change the
- database name
- username
- password
so they match to the database created on the destination host.
Once this is saved and uploaded into your www folder. Your done!
It can take up to 24 hours for your new website to appear. It’s different everytime. One time I setup a website it was about 15 mins. This time round it was about 6 hours.
Anyway, if your reading this. It means that my website is on its new host.
Hope this article has been of use to someone. If you have any questions, leave us a comment.
Great article . Will definitely apply it to my blog
The first attempt may feel difficult, but it’s amazing how easy it is to move a wordpress site.
Great article Mike, will definitely come in handy if I decide to migrate my site from my home server to an external host.