If you are reading this article, then it is very likely that you are not satisfied with your current web host. Before finalizing on a new host I’d like you to take a few minutes and go through my article – How to Choose a Web Host.
Now that you have a new place to host your WordPress blog you should make sure that you don’t lose any data during the transition. Your blog comprises of your posts, images, files, comments, themes and plug-ins. To make it a successful transfer you must try not to lose the posts, comments or images which are very vital to keep your blog from appearing broken!
Also be sure to download all the themes that you’ve customized as it can be very painful to edit the CSS and other code to make it functional as before!
If you follow the tutorial you’ll have a completely functional blog transferred over to the new host.
1. Don’t hint your current host that you’ll be transferring
One of the most important thing while transferring your blog to a new host is that you shouldn’t let your current host get the slightest of hint that you’ll be leaving them. While it is likely that they wonâ€™t do anything stupid but you never know. They can hold your website for ransom and tell you that your files got deleted “accidently” due to outage and other reasons. So it is better to be safe than sorry. So don’t tell them that you’re dumping them – atleast until you are fully up on the new host.
2. Backup your WordPress blog content
If you are not very comfortable in making a MySQL database backup then there is a very easy solution for that. You can create a backup of your posts, pages, comments, categories and tags from within the WordPress dashboard. Just head over to your WordPress dashboard, go to Tools, then click on Export. If you have more than 1 authors then select the “All Authors” option from the drop down and then “Download Export File”. WordPress will create an XML file with all the above info. Save it somewhere on your computer. The export file is usually a few MBs even for large blogs. You can also e-mail the XML file as an attachment.
3. Install WordPress on the new host –
Most of the web host these days come with a one-click install option for WordPress. It is there for a reason and you should USE IT. While installing the blog you’ll be asked to create a database. You can name it what you want but if you want to keep things simple I’d ask you to go to the config.php file located in the root folder of your directory and look what the name of the database is. In the same file you’ll also find the username and password as well as host info. Just copy-paste the same info while making the database.
If you have done everything correctly – you’ll successfully install WordPress.
4. Import the XML file
Now that you have successfully installed WordPress on your new host, time has come to import the XML backup file that you exported earlier in Step 2.
Login to WordPress > Tools >Import and select the file from your computer and upload it. Once you finish uploading you’ll see your posts, comments, pages, categories and tags. Hurray!
But we’re not done yet! While making sure that you don’t lose your blog content was our main goal we want our site to be back as before – looks-wise, function-wise and traffic-wise! So we need to import all the plugins and themes without your blog visitors experiencing major downtime.
5. Transfer the themes, plugins, images, etc
When you performed a new WordPress installation at your new host you simplified most of the steps. You basically created the structure common to all WordPress blog with folders like wp-content, wp-admin and wp-includes. Now login to your old host via FTP and download the WHOLE folder of your blog. Suppose you have a blog at http://www.example.com you should download the folder that contains all the files for http://www.example.com. It is usually located in the root or public_html folder on your host. If not sure ask the support to guide you.
6. Now change the domainâ€™s DNS server to your new host
Once you make sure that you have fully transferred your blog itâ€™s time to finally make the switch. Login to your domain registrar (from where you registered your domain) and go to DNS settings. If you donâ€™t know try looking in the help section or ask their support staff to change it for you. Most hosts give 2 DNS addresses which normally look like ns1.newhost.com and ns2.newhost.com
This will make sure that your domain redirects to the new hosts and serves your website from the new host rather than the old one. It might take upto 72 hours for DNS to propagate although it is usually very less. Iâ€™d suggest you change the DNS value during the night or when the traffic to your site is lowest during the day.
While the process is very easy it might take some time and effort to successfully complete the above process. Before starting Iâ€™d strongly advise you to make a complete backup of your blog. If you donâ€™t know how just ask your hostingâ€™s support to do it for you. Once you have downloaded the backup to your computer only then should you start doing the above steps.
If youâ€™re stuck on any step you can ask here or can go to http://wordpress.org/support although my experience from WordPress support hasnâ€™t been very good. The time to receive an answer is random at best â€“ ranging from a few minutes if youâ€™re lucky to never. Most of the time I had to figure things out myself which I really enjoy! Be sure to tell me how you handle changing your WordPress host.
Best of Luck!