In order to create a website and for your website to be accessible online, you need to select a server where it will be located. Servers are provided by web hosting companies and, if you started to take interest in this area recently, then the following guide will be of use to you.
It will be helpful to you if you first understand what web hosting actually is, why it’s important and what you need to look for in your hosting provider. If you didn’t bother with these details, then there’s a chance you’ll not get the best deal, nor the best package.
Luckily, this isn’t the end of the world; people change their web hosts all the time, for various reasons. Some are simply dissatisfied with the speed or quality of the content network distribution systems. Others find the same quality of service at a lower price or with more convenient payment terms.
If you find yourself in this situation, then it’s a good time to look for a better web hosting company. However, transferring your website can seem like a complicated task. This guide will explain the terminology, issues, and procedures, with step-by-step instructions, so you can move forward confidently.
Transferring your website to a different server can be done in five steps.
- Step 1. Find a new web host
- Step 2. Locate and download your website
- Step 3. Export your website database
- Step 4. Upload your website and import your database
- Step 5. Test your website
- Important things to remember
- Let the support team handle the transfer to the new host
Step 1. Find a new web host
Take time to research web hosts before selecting a new service. Go through online reviews and customer feedback, see what kind of deals other hosting providers offer, their pricing systems, server configurations, CDN, etc.
Once you find a suitable new provider, consider that, at some point in the future, you might decide to switch from that hosting service as well. For this reason, it’s recommended that you register your domain to a third-party provider, since this way, whenever you are switching web hosts, your domain will be unaffected.
Step 2. Locate and download your website
The next step is to find where your previous host has stored your website. Moreover, your site might be using more databases, so you should see if it is possible to obtain backup folders of them, as well.
Once you find the files, download them onto your desktop so that you’ll be ready to give them to your next hosting provider.
Step 3. Export your website database
As mentioned previously, if your website uses additional databases for purposes such as storing visitor data or managing forms, you’ll need to obtain them and export them. The process can vary, depending on the database, so it’s best to work out those details with your previous hosting provider. Hosts commonly offer phpMyAdmin as a tool for handling both exporting and importing website databases.
If you are using cPanel (which most probably you are), exporting a database isn’t such a complicated task. You will use phpMyAdmin that’s a native part of every cPanel. Don’t let the strange names, files, and databases discourage you; even if you don’t understand everything, you should still be able to do the entire thing by yourself.
- Navigate to https://my.bluehost.com/cgi-bin/cplogin and log in to your Bluehost account
- Find the “Database” tab and open it
- Click on the phpMyAdmin icon to open the interface
- Select a database
- Somewhere in the middle of the menu, you will find the “Export” button. Click on it.
- Choose “Quick – display only the minimal options” option. In order to use custom options, you will have to know a thing or two about MySQL, so choose this only if you know what you’re doing. Otherwise, the quick option will do the trick.
- If it’s not shown already, choose the “SQL” format as the chosen format for the export.
- Click on the “Go” button to start the export
- Choose where to store the file if asked (desktop or a custom folder which you will remember; you will need this file later, so don’t lose it)
That was quick, wasn’t it? Your database is now ready to be imported to a new host.
Step 4. Upload your website and import your database
Much as with the export, you’ll have to work out the details with your host. In the event you’ve exported your database to SQL, then through phpMyAdmin, you can use MySQL to import your website to your new hosting account. It’s really not that complicated, regardless of the tools that are used, and it’s usually something hosting providers do on their own.
When using a static website (which people today usually use only when they have a simple landing page to showcase their business), setting up everything on a new host is as easy as uploading files. In one of the previous steps, we told you that you should download all the files from your previous host. In this case, you just have to upload those files to the public_html folder on your new Bluehost account, and you will be done.You can choose one of the two simple options to upload the new files.
Upload via File Manager
If you are looking for a way to do this fast and just want to get it over with, you can use Bluehost’s File Manager:
- Log in to your Bluehost cPanel account.
- Locate Files and select File Manager
- Double click the public_html to open it
- Transfer all the files you have previously downloaded to this folder
Upload via FTP
Usually, File Managers are used for uploading or modifying just one of the files when you simply can’t afford to set up FTP clients for some reason. For example, you will use this when you need to change something on your site from a public computer that just couldn’t wait for you to get home.
But what we usually suggest is using an FTP client. You can quickly install FileZilla which is a free client and most commonly used by bloggers all over the world, and connect to the server by using the login credentials you received after registering for the new host. You will need the FTP server name, your username, and password.Once logged in, you should be able to see your small part of the server containing all the folders. It will look like a folder on your computer, so it shouldn’t be difficult to find the public_html folder.
Now simply locate the previously downloaded files, and drag & drop them to the folder. Depending on the size of the files and the speed of your internet connection, it might take up to several minutes to get everything transferred. FileZilla will inform you once everything is complete, so you can navigate to your domain from the browser to see the site back in action.
Dynamic websites use databases to store tons of information that are necessary for it to perform normally. If you are using a custom website or one of the popular CMS like WordPress, that means you do have the database as well, which means you need to transfer it along with the files.
Just like you exported the database, you can import one via PhpMyAdmin:
- Open https://my.bluehost.com/cgi-bin/cplogin from your browser and log in to your Bluehost account
- Find the “Database” tab and open it
- Choose phpMyAdmin icon to open the interface
- Somewhere in the middle of the menu, you will find the “Import” tab/button.
- Click on the “Browse” button, and find the database you previously exported. Make sure that you unzip it first if the database is zipped (you should have the .sql file ready)
- Click on the “Go” button and wait for a few minutes
If everything was ok, you should see a message like this: “Import has been successfully finished, X queries executed.”
Are you using a Content Management System like WordPress?
If you are using a content management system like WordPress, Blogger, or Joomla, you can make everything much easier with their native migration options. For example, if you’re migrating a WordPress site to a new host, you can do everything with their Import & Export options which will allow you to transfer the entire site in a matter of few clicks. Lucky you!
Step 5. Test your website
Once the transfer is complete and the databases are imported, you can test your website. The best way to do this is to use a temporary URL. This allows you to access your website even when your domain name is not pointing to the new server.
In order to find your temporary URL, log in to your account management panel. Next, click on “Account Technical Details.” Once you are in, there should be a section called Temp. URL, with your temporary URL displayed next to it. All you need to do is simply visit that URL and check out your website.
A temporary URL looks like this:
Replace the “ipaddress” with the IP Address of your host, and the username should be the same one you are using to log in to your cPanel account. Don’t forget the “~” before it.To find your server IP address, log in to your cPanel one more time. Find the “Stats” tab and click on the “Expand stats” button which will reveal extra information, including the IP address of your shared hosting account.
Now you will be able to test your website on a temporary URL while you’re waiting or until you set up the Name Servers to point to your old domain.
If your site looks and works as expected, then great! However, be prepared to make some minor tweaks and changes if something is wrong.
Important things to remember
Once the whole transfer process is complete and you’ve tested the website, there are a number of things you must do to finish the transition. Keep in mind that these are necessary steps to ensure that your old visitors keep visiting your website, as well as to be certain that your site is performing as planned. So, let us begin.
Inform users that you’ll be moving your website
When you’re moving your website, the downtime should be as short as possible. It’s ideal if users barely notice that the site was not functioning. However, you should give some sort of notice a few days ahead of time, both on your website and on your social network profiles. You should also see that the message is visible during the downtime, so your users will know that the site will be back up in a timely manner.
Change the DNS
This is a minor detail that can be easily overlooked. Once you transfer your website, you must switch your DNS record to the new server where your site is registered. The reason why this is important is that a DNS record is like a map or an instruction guide that ensures your visitors arrive on the right page. Should you neglect to change this, users will be misdirected to an error page. You need to get a new DNS from your new hosting provider and replace your old one.
After you make the request to move your DNS records, it should take a few hours, or in some cases a whole day, for the switch to be complete. In other words, if your visitors are complaining that they can’t find your website, make sure you’ve updated to your new DNS.
Monitor the site’s uptime
When a new DNS is assigned, your transfer is basically complete. You’ll want to monitor your server’s uptime diligently over the next couple of days to make sure everything is working properly.
It’s critical to not drop your guard and that you notice if there are any issues as soon as possible. Of course, monitoring your website’s uptime does not imply that you need to visit your website every 5 minutes; it means that you’ll need to use tools and apps to help with the task.
Some useful tools you can rely on are Pingdom, Uptime Robot, and Monitor Us. Regardless of the tool you choose, you need to calibrate them to monitor the following elements: Ping, HTTP, DNS Server, and TCP port.
One thing you should really be aware of when switching servers is the possible loss or misplacement of assets like graphics. The change of the hosting environment can cause this to happen, and it’s not unlikely that you’ll see some 404 (not found) errors. So, simply be on the lookout and monitor your 404 logs so you can see if there are any broken links or non-working assets. When you find them, a quick repair or replacement might be required and you’ll be good to go.
Another way to deal with this problem is to redirect from a 404 page to another page that already works. This is not a solution to the problem, of course, it is simply an alternative to displaying a 404 page.
This works for both pages and directories, so your users will always have content to look at, rather than a 404 error. Lastly, you can use this to your advantage and create a customized 404 error page, which can be amusing or entertaining, perhaps by displaying a funny picture or a quote. This way, your visitors won’t be as likely to object to land on the page.
Here are a few tips that can help you deal with broken links and 404 pages. To make them work, you will need to place the code into the .htaccess file.
Here is how you can edit .htaccess using FTP (FileZilla):
If you can’t find the .htaccess file on your server, the chances are there is no one or it’s simply hidden. For starters, make sure “Show Hidden Files (dotfiles)” is selected if you have logged in to the cPanel and using the File Manager or that you have the “Force showing hidden files” selected from the top menu in FileZilla. If you still can’t find the file, you should create a new one in your public_html folder by right clicking and creating a new file named “.htaccess”.
Then you can use the code:
- Define a 404 page: ErrorDocument 404 /errorpage.html.
- Redirect a page to the new location: Redirect 301 /old-page.html http://www.example.com/new-page.html.
- Redirect an entire directory to a new location: redirectMatch 301 ^/category/?$ http://www.example.com/new-category/.
After you have done the changes, you should save the file and upload it back to the server by overwriting the old file.
Switching your email
Again, switching email is something people often overlook. Once the migration to the new web host is complete, there are three different ways to transfer your e-mail.
- If your email is hosted on a domain registrar, you can easily move it. All you need to do is change the (@) record, and assign it to the new host’s IP address, which is commonly located in your new host’s customer portal
- If your email accounts are hosted with a third party, you must do the following. Make sure your MX records, as well as other relevant records requested by your email service provider, are updated in the new DNS. Considering that you’re moving your DNS to a new provider, it’s essential that you move these files as well. Of course, if you aren’t moving the DNS, then all you need to do is follow step 1.
- Lastly, if your email accounts are hosted with the previous hosting provider, you can recreate the existing email account once you make the switch to the new provider. You’ll also have to configure your new email agent.
If you need a more detailed explanation on how to complete this step, check out this guide.
Chance of a corrupted database
Last, it may happen that your data becomes corrupted in the transfer. There is no reason to panic, and there are numerous solutions to this problem, but they all depend on the platform itself. Since the most common platform is WordPress, we’ll discuss some possible solutions for this platform’s database.
If your WordPress database is corrupted, you can re-try the transfer, but you first need to disable all the plugins. If this works, just turn on the plug-ins again when the whole website is imported. Unfortunately, this won’t be a viable solution if you cannot access the dashboard, so you might have to try some of the following options:
- Re-upload the database, and write it over the old one.
- Try to identify the exact location of the corruption error, and just re-upload that specific file from your old site.
- Open the file to ensure that it’s pointing to the new server.
How to repair a broken WordPress database
Sometimes, exporting & importing a database will not go as smooth as you wanted. But before you lose your mind over it, you can still try a few tricks to repair it.
- Log in to your cPanel
- Open PhpMyAdmin
- Select the database from the left-hand side menu
- Once you have selected the database, you should check if you have the correct one. A WordPress database has all tables labeled with wp_
- Choose “Check all” button on the bottom of the screen to select all tables from the database
- Select “Repair table” option
That’s all you can do here. After the repair process, you should see a message confirming that the database was repaired successfully. If you still haven’t managed to repair the database, you can try one more thing, and that’s modifying a wp-config.php file.
- Open FileZilla and log in to your FTP server
- Locate wp-config.php file
- Download it to your computer
- Modify the file by opening it in a text editor
- At the end of the file, insert this: define(‘WP_ALLOW_REPAIR’, true);
- Save the modified wp-config.php file and upload it back to the server via FileZilla and overwrite the file
- Open your browser and navigate to http://yoursite.com/wp-admin/maint/repair.php
- Click the “Repair Database” button
After the repair process is done, you will see status messages about the tables in the database so you will be able to identify if something was corrupted. Also, you will be able to see the following message: “Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.define(‘WP_ALLOW_REPAIR’, true);”
So, don’t forget to go back to the file, remove the line you added and resave it.
In the event that none of these approaches work, you’ll have to find someone who is skilled at coding to initiate the WordPress auto database repair process.
Let the support team handle the transfer to the new host
If you aren’t sure how to do the entire transfer to the new host by yourself, or you simply don’t have time to waste on such technicalities that you don’t really care for, you can leave everything to the skillful hands of professionals at Bluehost.
Well, yes, you will have to pay for the transfer. But in that case, you will be able to relax, go for a walk or soak some sun on your skin if you’re lucky enough to live near the beach while the support team does everything for you.
Bluehost can move the site to their servers for you and it will cost you $149. 99. This price includes migration of up to 5 websites and 20 email accounts. Yes, the support team will take care of all the files, databases, and everything that’s essential for your site to work & look the same way it did on the old host.
It doesn’t really matter where you hosted the site if you choose this option, but please note that Bluehost currently does not offer migration support for Reseller, VPS, or Dedicated Server accounts.
One of the great things about this is that there’s no risk involved. If you are ready to start the migration to Bluehost, their experts know what they do. Even with that in mind, they understand that your site is important to you so they will review everything and make sure it’s fully functional before you get your hands on it.
If you are ready to start the migration to Bluehost, please see more details here.
Switching a web hosting provider is not a huge hassle. There are a few potential problems, but nothing that can’t be resolved in a timely manner.
If you’re not satisfied with your web hosting service, don’t be hesitant to find another provider. This guide will help you through the process with minimal downtime and inconvenience.