There are many reasons you might want to migrate your website to a new host. It may be that you are not happy with your current hosting provider, you have found a better deal, or you have simply outgrown your old hosting plan.
Migrating websites to a new host can be a daunting prospect for inexperienced users, but it’s a straightforward process. Follow these steps to migrate your web hosting with no downtime:
Join a New Host
Before cancelling your current hosting provider, you need to sign up with a new host. It’s important that your new host is ready before cancelling your previous one. Don’t tell your current hosting provider that you’re cancelling, otherwise they may prematurely cancel your account. This will cause downtime and could result in data loss.
Now that you have two hosts running at the same time, you need to transfer all your data. This includes all your files and databases. Go to cPanel in your old host and compress all your files and folders located in the “public_html” folder into one compressed file. Download this file and keep it safe. Alternatively, you can download all your files via FTP using a program such as Filezilla.
If you use databases, you’ll need to download them too. Go to phpMyAdmin in your old host and click on the database you want to download on the left side of the screen. Then click “export” on the menu at the top of the screen and export your database.
To upload your database to your new host, you’ll need to create a new database using cPanel. Go to cPanel on your new host and click “MySQL Databases.” Create a new database and assign a user to it. Keep a record of the database name, username, and password as you’ll need this later.
After successfully creating a database, go to phpMyAdmin and then select your new database from the menu on the left side of the screen. Then click “Import” on the top menu and locate your exported database on your computer by clicking the “Browse” button and then click “Go” at the bottom of the screen.
If your website uses a database, you’ll need to update the database name, username, and password for your new database which you’ve just created. Depending on your website, this information could be located in various places. In WordPress, for example, you will need to edit the “wp-config.php” file with your updated database information.
You are now ready to start uploading all your files to your new hosting provider. You can do this with “File Explorer” in cPanel or use an FTP program. Ensure that you have the same file structure in both hosts. If everything is correct, you’re ready to move on to the next step. If you have any problems at this stage, you will need to fix them before changing the nameservers.
Now that you have imported your databases and uploaded all your files, you’re ready to change your nameservers. Go to your domain registrar and enter the nameservers for your new hosting provider. You will need to wait up to 48 hours for the DNS changes to propagate. During this time, your website will load randomly from either your old or new hosting provider. After 48 hours, your new DNS settings will have been fully propagated and your website will be loading from your new host.
Once your DNS settings have been fully propagated, you can safely move your existing emails to your new host. Locate the “mail” folder in your old host using “File Manager” in cPanel or use an FTP client to download it.
Now upload the contents of your “Mail” to the same directory in your new hosting. Go back to the home screen of cPanel in your new hosting and go to “Email Accounts.” If you have done this step correctly, you should see a list of all the email addresses which were created in your old host. Open “Webmail” for each email address and check that all emails and folders are correct.
Cancel the Old Host
When you have everything successfully migrated to your new host and everything is working as it should, you can safely cancel your old host. If your old hosting provider also provides your domain name, you should be careful not to cancel that too. Alternatively, you can transfer the domain to a new registrar before cancelling your old hosting.
Changing web hosts can be a daunting prospect for many people, but if you follow the steps in this article, you will have successfully migrated your website to a new host with no downtime. The important thing to remember is to ensure that you download and backup all your data before cancelling your old host.
After successfully uploading your files, changing the database settings, and uploading all your emails, it’s safe to change your nameservers. Remember that it can take up to 48 hours for the nameservers to fully propagate. After this time, your website will load from your new host and the migration has been successful. Only cancel your old host once you’ve verified that everything is working correctly with your new hosting provider.