When it comes to your website, a starter hosting package on a shared host is enough when you’re just getting started. However, as your website grows, you will soon notice that the initial package is no longer enough.
Whether you need more disk space or more bandwidth or simply looking for a host with better security features, there will inevitably come a time to migrate your website to another host.
If you’re like most people, you’re probably worried about switching hosts not only because this task sound intimidating but also because of potential downtime. The good news is that when you take a little time to prepare for the move, switching hosts is not as difficult as it seems.
In this post, I’ll show you how to properly migrate your site to another host without damaging your site and without any downtime.
Before you begin the transfer process, the first step is to back up your website’s files. This process is slightly different than the usual WordPress backups because you will need to download your website’s files manually.
To do this, use a program like Transmit or FileZilla to log into your current host’s FTP server and then download all of the files that are in your website’s directory.
Don’t forget to download the .htaccess file which is usually hidden so be sure to set your FTP program to display hidden files.
Save the files to a folder on your desktop or somewhere else where you can easily access them later.
While your site’s files are downloading (which could take some time, depending on how big your website is) log into your host’s cPanel and navigate to phpMyAdmin application. Here, you’ll need to export a copy of your WordPress database.
Using the phpMyAdmin interface, select your website’s database on the left-hand side. Click on the Export tab. Set the Export method to Quick and the Format to SQL. Then, click Go. Save the downloaded .sql file in the same location as the rest of your website’s files.
The next step is to sign up with a new hosting provider. However, don’t cancel your old hosting account just yet as this will cause your website to have downtime.
Once you have your new hosting account, there are a few steps to follow:
Now it’s time to edit the wp-config.php file in your website’s files. This file holds all the information about your website so it’s a good idea to make a copy of the original file before editing it first.
Then, open the original file and make the following changes:
When you’re done making those changes, save the wp-config.php file.
Now it’s time to start transferring your website to the new host. To begin, log in to your cPanel and open phpMyAdmin application again. Locate your new database and once it loads, click the Import tab.
Here, you’ll want to select your exported database and uncheck the box that says Partial Import. Double-check that the format is set to SQL and then click the Go button. Wait for the import process to finish and then move on to the next step.
Now that your database is ready, let’s transfer the files to the new hosting server. Launch your FTP program and this time connect to the new hosting server. Locate the /public_html folder and double-click it. Drag all of your website’s files to the public_html folder and sit back while the upload process is complete.
Bear in mind that this process can take some time, depending on the size of your website.
Once all of your website files have been transferred, you will need to update your DNS settings or your domain name servers to point to the new hosting server. For this, you will need to log in to your domain registrar’s account.
This process varies from one domain registrar to another so here are some general steps that will help you complete this step.
Look for a section named DNS settings, Nameserver Settings, or DNS Zone editor. Once you locate it, click on it and locate the correct domain name. Enter the new name servers and save the changes.
If you need extra help completing this step, don’t hesitate to get in touch with your domain name registrar as they will be able to point you in the right direction.
After you have updated the nameservers, keep in mind that the DNS changes can take up to 48 hours to fully propagate. You can check the status using a tool like What’s My DNS?.
Once the 48 hours are up, your website should be loading from the new hosting provider. At this point, you can visit your website to make sure it looks as it did and that everything transferred over correctly.
Then, log in to your old hosting account, delete all the files and cancel your hosting account. If you’ve purchased your domain name with your hosting provider, make sure to cancel only the hosting portion and not your domain registration, otherwise, you’ll lose your website once the domain expires.
If you’re moving your site to a new or a different domain as well as switching hosts, there is one extra step you need to take after transferring your files to the new server and before updating your DNS settings.
You will need to replace all the links on your website that link to your old domain name to ensure the links keep working after the transfer. Doing this manually would be a time-consuming process so the best way to do it is to use a tool like Search Replace DB script. Using this script, you can quickly replace all the old links with the new domain name. Be sure to delete it when you’re done.
If you want a hosting company recommendation, be sure to check out this page and watch my web hosting test video where I’ve tested and compared the best hosting companies to bring you the best web hosting for your WordPress website.
As you can see, migrating to another host is not as complicated as it seems. With a little planning and preparation, you can move your website to a better hosting company without experiencing any downtime or damaging your site. Use this tutorial to help you prepare and walk you through the entire process.
I have tons of great free content and giveaways! Join 10,000+ others and get access to coupons, freebies, and other great wordpress tips and tricksfor your wordpress website!