How to Change Web Hosting Provider

By David

This post may contain affiliate links. See our Affiliate Disclaimer.

How to Change Web Hosting ProviderIf you have made the decision to change web hosting provider then the next question is bound to be “how?”.

Fear not, this guide will break down your options and make it as straight forward as possible.

Before proceeding with a guide on how to do it yourself, there might be another option available to you. If you sign up for the two services I recommend, Siteground and WPEngine then you can benefit from automated website migration.

Siteground offers a free migration service where they will handle it for you and WPEngine have an automatic migration tool you can use yourself to migrate your website to their servers. Other hosting providers also offer similar solutions.

Of course, you will still need to change the DNS or nameservers on your domain to point over to your new hosting afterward but that’s usually a pretty painless process.

For some, the manual option might be the best and safest route and it’s a good process to learn anyway because the same process shows you how to take a manual backup of your website whether you are using WordPress or another CMS for your site.

Manual Website Migration

Doing a manual migration is in my opinion and experience is the safest option with the highest success rate.

To get started you will first need to back everything up.

Here’s what you need to backup and download

  1. All of your website files
  2. Your MySQL Database

Backup Website Files

To download all of your website files you want to go into your CPanel and then locate the File Manager. If your host uses Plesk or another type of control panel for your hosting environment look for something along the lines of File Manager where you can access your site files.

How to find Hosting File Manager

Once you have that open, locate the folder where your files are stored.

Typically this is inside the public_html folder, though it can differ especially if you have more than 1 website installed on the same hosting account.

In this case, you might find your website is in a subfolder of public_html that resembles the domain name.

If it’s a WordPress website the contents of this folder will include wp-admin, wp-content and wp-includes folders and a wp-config.php file as well as many others.

Once you find these files, you want to highlight the entire contents of this folder and right-click, then go to compress. Choose “Compress Files” and this will start creating a zip or tar file that contains all of your files (see the screenshot below for an example). You can also choose a custom name for your new zip file.

Compressing Files in CPanel File manager

You want to compress it because it’s a lot faster to download and re-upload 1 large file than hundreds or thousands of smaller files, you also have less chance of one file corrupting and not knowing which one if your internet is disconnected during upload or download.

After the compression is complete you will see your zip file in the folder with the name of the first file or folder in the list unless o f course you chose a custom name when creating it. The name doesn’t matter though, as long as you know which file to download.

It’s usually the biggest file in your folder since it contains all of your site files.

Download the compressed file to your computer and then this part of the process is complete.

Backup Database

Most modern website tools and WordPress in particular use a MySQL database to store all of the website data, content and settings for your website or blog.

To download a copy of this from your current host, look for a section called “Databases”. If your host uses CPanel you will see a section with this name and a tool called PHPMyAdmin.

How to Export a WordPress Database from CPanel

Open PHPMyAdmin and then find the database you want to download.

If you have multiple and aren’t sure which one is the right one, click on one of them and go to the wp options table. This should contain the web domain of the site it’s connected to.

To confirm this is the correct database (in case you have multiple using the same domain) open your wp-config.php file in the file manager or extract your compressed backup of the website files and check which database is listed in there next to db_name.

Once you have the right database go to the Export tab, and then go down to the button that says “Go”. You seldom need to mess with the settings here.

Export Database from PHPMyAdmin

This will download a .sql file when the process is complete.

You now have a backup of your database and if you completed the steps above you will also have a copy of all of your files. That’s everything you need.

Next, we are going to look at uploading everything to your new hosting provider.

Uploading Website Files

Login to your new hosting provider’s control panel or CPanel and look for the file manager tool. This is often the same or similar to the process of downloading the website files but it may differ in some cases.

Once you have the file manager open and you have navigated to the public_html folder it’s time to upload your zip file.

After it has completed the upload, right-click on the zip file and go to “Extract”.

This will uncompress the file and the files will be available again.

You want to select it to extract in the current folder, not a new folder but if that does happen you can just go into the subfolder, highlight the contents and drag and drop them up a level into the parent folder by using the top folder with the … next to it or on the left-hand navigation where you can see the folder structure of your server.

Ideally you want to keep this open as you will need to change some settings but you can come back to it later after you have created and uploaded your database.

Once extracted you can delete the compressed zip file from your server as you won’t need it again. It might be wise to keep a copy on your computer for safe keeping though just in case.

Create and Upload Database

Before you can upload your SQL file to your new hosting account you first need to file the databases section and look for either MySQL Wizard or a “Create Database” option.

CPanel MySQL Wizard

Complete the steps to name your database and create it.

Create new SQL Database in CPanel

Next we need to create a database user, give that user a password that’s secure (this is important!), assign it to the database we just created and give it all privileges.

Create Database User - MySQL - CPanel

Add Database Privileges WordPress

Make a note of this password as well as the database name and the database username. They can be the same but in some cases they are different. You can name them whatever you like.

Next we want to go back a page to the main control panel and look for “PHPMyAdmin” again under the Databases section.

How to Export a WordPress Database from CPanel

Once that is open we should see our new database listed on the left-hand side.

Click on it and you will notice it is empty.

Go to the “Import” tab and click the option to upload a file and then select the SQL file we downloaded.

Import WordPress Database

Click “Go” and run the import.

This will import all of your old settings.

Connecting Your Database

Now you have to connect your WordPress install to this new database, so go back to your file manager and find the wp-config.php file in the root folder (again, this is usually public_html).

Find the line that says db_name and update it

Find db_user and update it.

Find db_password and again update it.

That should be everything if you are keeping the domain name the same and if so you can proceed to the next step where you will point your domain to your new hosting account.

If you are changing domain names then you will want to point your new domain to the new hosting account but you will also need to update the WordPress settings so it works with the new URL.

Add the following two lines to your wp-config.php changing yournewdomain.com to your own domain name.

define('WP_HOME','https://yournewdomain.com/');
define('WP_SITEURL','https://yournewdomain.com/');

You can also go into the database again via PHPMyAdmin and looking for the URLs for wp home and wp siteurl that are under the WP Options table.

That’s it, you’re done, now you know how to change web hosting provider the manual way and how to migrate everything.

How to point your domain to a new server

The next step is to log in to your domain registrar and then point the domain over to your new hosting account.

Keep in mind if you are also using the email service of your old hosting account you will need to recreate these email addresses with your new hosting provider.

If you want to transfer all of your emails from your old inboxes to your new ones you will need to either migrate them with IMAP or if they are POP3 you will need to download them via an email client and connect your new email addresses so you can drag and drop all of your emails from the old email accounts to the new ones.

I will look at creating a guide on that soon.

Once you are in your domain provider you will want to find the section that allows you to change the “Nameservers” this is usually under “DNS Settings” or “Domain Manager”.

As you can see in the below screenshot from my GoDaddy account, I have selected “Use my own nameservers” instead of using GoDaddy’s default nameservers and this points to the addresses for my Siteground account.

Change Nameservers - Point Domain to New Hosting Account

In your new hosting account they should provide you with your new nameserver addresses. They will usually provide you with two and you should add both in your nameserver settings in your domain registrar.

In some cases, you might be using external DNS management like Cloudflare. If you are then you want to just point the specific “a records” to your hosting company from inside your Cloudflare account.

Using Sitegrounds Free Migration Service

If you are using the GrowBig or higher plan with Siteground then your new account comes with 1 free website transfer that they will take care of for you.

Once you sign up you can choose to use the service and provide the relevant information needed for them to connect to your current website, then you will get an email update when everything has been transferred.

You can learn more about this process on Sitegrounds’ user guide.

The only step you will need to do is point your domain over to Siteground using the instructions earlier in this article.

How to use WPEngine’s Automatic Migration Tool

WPEngine has its own migration tool called BlogVault that comes in the form of a WordPress plugin you install on your website and then follow the steps to connect it to your new server so you can take a copy.

It’s very easy to use and I have used it a handful of times since WPEngine doesn’t give you access to CPanel or a File Manager this is the best method if you are switching to WPEngine.

Other Ways to Migrate WordPress with Plugins

There are two other plugins I have used a handful of times over the years that can also work for migrating websites. I have just come to the conclusion it’s far more reliable and consistent to migrate manually.

All-in-One WP Migration

All-in-One WP Migration is the best 3rd party plugin I have used for cloning a WordPress website and it works pretty well on smaller websites under 100MB but it can struggle and have issues when migrating larger websites.

If you aren’t comfortable with the manual process then it’s worth trying but I definitely recommend using the manual method first as it’s a good skill to have.

Duplicator

Duplicator is another plugin that allows you to quickly clone a website, I haven’t used it much for the last couple of years but it used to work pretty well. The process isn’t as user-friendly and intuitive as WP All in One Migration so if I am going to use a plugin to clone a small site then I will use that plugin over Duplicator.

Conclusion – How to Change Web Hosting Provider

Moving web host isn’t too hard to do but it’s worth having a guide to help if you are going to be doing it manually yourself. As a developer, I prefer to use the manual method as it means I also have a stored backup on my desktop and there’s less that can go wrong.

When you are done, don’t forget to shut down your old hosting account to avoid any unnecessary fees but it’s worth waiting a few weeks to make sure everything is working 100% before shutting down your old account.

To help you decide whether you should change web hosting provider or not see our guide covering the criteria to look at.

If you are still unsure, have any questions or require assistance feel free to contact me or join our Discord server and ask for assistance there.

How to Change Your WordPress Web Hosting Provider

This page may contain affiliate links, which means I receive a small commission, at no additional cost to you, if you make a purchase through a link on this page.

Posted in ,

Last Updated on

Mazepress, Wordpress, Genesis

Want the latest tools in your inbox?

Sign up below with just your email for free and get weekly insights on digital marketing, growth hacking, eCommerce and Social Media in your inbox.

Avatar

David

Web Designer, Digital Marketer & Entrepreneur with over a decades worth of experience helping small and medium sized businesses evolve and adapt to the modern digital marketplace.

Have a question or comment? Click the button below to join our Discord channel.