How to transfer web hosting
Are you looking to switch hosting providers, but don't know where to start? If so, you're in the right place. By following our simple step-by-step guide, you'll have no problems migrating your website to a new web hosting provider.
How to transfer web hosting step-by-step
To transfer your website to another hosting company, complete these nine steps:
1. Choose a new hosting provider
Before you start with anything technical, you first need to choose a new web hosting provider. This is one of the most important factors you'll need to consider when migrating your web hosting, as you'll want to find a good host to transfer your site to. Below are some of the factors you should keep in mind:
- Cost: Look at both the initial and long-term costs associated with your contract and find out whether the hosting provider offers a scalable plan that can fit within your budget.
- Reliable performance: Make sure the hosting provider guarantees high uptime and performance.
- Security: Your web host should have a variety of security protocols to keep your website and data safe, such as SSL certificates.
- Tools-galore: Ensure that your web host supports numerous platforms, whether you use a content management system like WordPress, or you’ve coded the website from scratch. Another tool to look out for is a plugin that allows for easy integration.
- Extra features: Look out for any juicy features that a particular web hosting provider may be offering, such as 24/7 customer support, free website transfers and promotional offers.
- User experience: Keep in mind the user experience when looking at your web host, for example, we have a Control Panel that allows you to manage all your services from one place.
After you’ve chosen your new website, ask them to perform a direct website transfer for you if this service is available. If not, you’ll need to conduct a manual website transfer, which we’ve outlined below.
2. Save your website's files
Before you start to transfer your website, it’s important that you save the site files, just in case you end up losing it.
We recommend that you download your website files using an FTP (File Transfer Protocol) service called FileZilla (it’s one of the best, and it’s completely free).
a. Create a file on your desktop
Make sure you save the file in a place where you’ll be able to find it later on, and include a date and file name so you can identify that this is the first download.
b. Download the FileZilla Client
Ensure you download the correct FileZilla by following this link: FileZilla
c. Create a new FTP account with your current hosting provider
You should be able to find your FTP details in your Control Panel under the "Hosting & Domains" menu. For more information, check out our guide to using FTP.
d. Link FileZilla up to your current hosting account
Open up FileZilla and enter your FTP login details (server, username, and password), in the Port field, enter the number 21. Press Quick Connect and you should be connected to your FTP space.
5. Download the files to the folder you created earlier
With FileZilla open, in the top-right quadrant you should see something similar to your hosting portal. On the left, you should see your desktop files. Simply drag and drop your website files into your destination folder on the left (the one you created).
FileZilla will give you a notification once you’ve dragged it in. How long this takes will vary depending on how big your site is. Either way, by the time it’s done you’ll have a backup of your site saved onto your local device, which will now be visible in your desktop folder.
3. Export your database
Before we jump into this step, you should be aware that not all websites have a database, so this may not be a necessary step. If this is the case, skip this step (and go straight to number six).
Static websites where the content within them remains largely unaltered tend not to have a database. Any site that permits user generated content (such as comments) or dynamic pages (which change automatically depending on where they’re accessed from) will certainly have a database attached.
The most common type of database is MySQL. This can be exported using the app phpMyAdmin, which you can easily access from any hosting account using the standard cPanel dashboard.
If your database is not a MySQL database, or you can’t find the phpMyAdmin option in your current hosting account control panel, it’s best to check in with your hosting support team.
Here’s how to export your database:
- Once you’re logged into phpMyAdmin, find your site’s database name from the List of Current Databases and click Export
- Find your site’s database name from the List of Current Databases and click the Enter phpMyAdmin button
- Tick the Check All box at the bottom of the page to select all tables, and click Export
- Select SQL from the Format drop-down menu and click the Go button to start downloading
- Find the SQL file you’ve downloaded and move it to the same folder as your website files to keep everything in one place
4. Create a new database
In order to import your database into your new hosting dashboard, you first need to create a blank database.
Start by logging into your newly created hosting account. Side note: we’re assuming that you're using a MySQL database.
Here’s the process, step by step:
- Log in to your new hosting account
- Open the MySQL Databases section (stored under Databases in your account control panel)
- Under the heading Create New Database, type in the chosen name of your new database (put this in the field labelled New Database)
- Click the Create Database button
A prompt will appear asking you to create a username and password. Make sure you remember these and grant yourself full user permissions when prompted.
5. Import your database
Next, we’re going to add the downloaded database file to the new database we’ve created in our new hosting account.
- Go into your new hosting account and navigate back to the Database section
- Here you’ll find a + button under your username in the left quadrant which will show you all your databases (including the one you’ve just created)
- Once you’ve selected the new database from the list, you’ll be prompted with the message ‘No tables found in database’
- Navigate to the Import tab in the top menu
- Click the Choose File button, and choose the SQL file that you saved earlier. The name of the file will appear next to the button
- Do not change any other fields on this page, and click the Go button at the bottom of the screen when you’re finished
- You’ll see a loading wheel appear, indicating that your database is being imported, and the final message: ‘Import has been successfully finished’ will appear when it’s been completed
6. Modify your website's files
So far so good. Your database has been successfully moved across to your new hosting provider. Next step, move your files across.
For websites that have both files and databases, we need to complete an extra step before we do this.
Beware, it’s going to involve a little bit of coding, but nothing even a novice can’t handle, and we’re going to take you through it step by step so you can’t make a mistake.
Here’s how you can edit the files for Joomla and Drupal, two popular CMS platforms. WordPress is the most popular CMS platform, so we’ve made a separate guide on how to backup your WordPress website in more detail.
For the following examples we’re using this information:
New database name: mynewdatabase
User: abc123
Password: fasthostsarethebest
a. Joomla
File name: configuration.php;
How to edit: Using ‘Ctrl + f’, search the term ‘localhost’ (this should not appear far down the page). Plug in the details for your new database, so the three fields underneath this line read:
public $user = ‘abc123’ ;
public $password = ‘fasthostsarethebest’ ;
public $db = ‘mynewdatabase’ ;
b. Drupal
File name: settings.php.
How to edit: Using ‘Ctrl + f’, search the term ‘databases’ (this should not appear far down the page). Plug in the details for your new database, so the three fields underneath this line read:
‘database’ => ‘mynewdatabase’ ,
‘username’ => ‘abc123’ ,
‘password’ => ‘fasthostsarethebest’ ,
7. Upload your website's files
Now that we’ve successfully modified our website files so they’re in sync, we can start to upload your website files across to your new hosting provider. As usual, we’ll be doing this using an FTP.
a. Create an FTP account with your new hosting provider
Since this is the first instance your new account has used an FTP, you’ll need to create a new FTP user account.
To do this, go to the files section of your dashboard and select FTP accounts. Then create a new user and password, and take note of these and your Port number (which will likely be 21).
b. Sync FileZilla to your new hosting account
This is the exact same process we used to sync FileZilla to your old hosting account in step 2.4, but just replace the details with the ones you just created.
c. Upload your website files to your new hosting account
Just like before, you’ll see your desktop files in the left quadrant, and the website setup on the right quadrant. Your files originally came from the folder labelled public _html, so this is where you’ll be able to find them now. Ensure that you keep the original structure of the files, in other words: don’t start combining any of the files that weren’t originally combined.
When you’ve successfully completed this, you should see the files appear in the correct location on the quadrant on the right side.
8. Test your website
Now that you have a full backup, it’s time to get it on to the new location. But first, let’s double check that it’s working in a private ‘risk free environment’ before we put it live for the whole world to see.
The quickest way to do this is through a test domain function, which is offered by most hosting providers. Get in touch with your provider and they will be able to guide you through the process.
9. Update your DNS settings
This leaves us with one final step: changing your DNS. You can do this by logging into your domain registrar’s portal, or contacting your domain registrar to get access to your advanced DNS records for your domain.
The two records you'll need to change are the ‘www.’ record and the ‘blank’ record, otherwise known as the ‘apex’ record (the name will depend on your domain host).
Next, get the IP address of your new hosting location (which should be visible on the portal or control panel) and put it into your DNS. Once that’s confirmed, your website will be ready and in a new location.
You’ve done it! If you followed our steps, your website hosting has been successfully transferred to your new hosting provider. Remember that throughout this process, if you’re experiencing issues, you can always get in touch with your hosting provider who can help you throughout the process. In case you have any questions, don’t hesitate to get in touch with our sales team.