A Complete Guide To Migrating Your WordPress Website To A New Host
In an ideal world, you would pick a hosting provider to host your WordPress website and never need to migrate to a new host. But we don’t live in an ideal world and not every hosting provider can offer the same quality of services. From stronger uptime and faster speeds to cheaper plans and better support, there are a plethora of reasons why you would need to migrate your website.
Migrating your website to a new host can be a bit stressful at times and might take up quite a bit of time, but it is a relatively straightforward process. There is a bit of prep-work involved as well and can become technical at junctions, but it is nothing that you cannot handle.
In this ultimate guide, we have broken down the whole process into several easy steps, each of which involves one or more tasks. This is done to present a simpler understanding of the whole process so that you can easily migrate your WordPress website and know what you are doing at each step of the way.
But before we begin discussing these steps there is one question you must ask yourself. Do you want to carry out the whole process manually or do you want to use plugins that will automatically carry out the process with minimal intervention on your part?
Options For Migrations
Well, there isn’t much technical jargon associated with migrating your WordPress website. However, in case you want to do it manually, you will have to be comfortable in using FTP or File Transfer Protocol, accessing your databases, and modifying certain files at your website’s back-end.
Don’t worry, these terms may sound complex but there isn’t much to it once you understand the underlying basics. A simple tutorial(s) is enough for homework. On the other hand, if you are simplistic to the core you would want to explore the other option: using WordPress migrating tools and plugins to keep your involvement to the minimum. There are many such tools in the market for you to use.
There is one thing that you need to keep in mind though; large websites are prone to errors where migration plugins are concerned. Do you have such a website? Then manual migration is always recommended for you. If so you need to carefully go through our guide below; understand the steps and follow them as detailed and you won’t find yourself in a jam.
Now there is one thing that I would like to address beforehand. Some web hosts offer free website migration services even though such services are not always marketed. New subscribers are typically the eligible ones for free WordPress site migration services. You can also outsource the whole process to third-party services, but that might just turn out to be a costly affair for your budget.
So with that out of our way let us see how we can migrate our WordPress website both manually and by using plugins.
How to migrate my WordPress website manually?
As mentioned above the step-by-step process looks something like this:
- Gather your resources first
- Sign up with a new host
- Backup your data
- Edit the wp-config.php file for your website
- Upload your website files and database to your new host
- Update your DNS settings
So let’s break down each of these steps and see how they work out.
Gather your resources first
You will need a few things or resources before you can get started with the actual migration processes. Thus our first step is to prepare ourselves for the following undertaking. These resources are:
Credentials for your old and new hosting accounts
At certain points during your migration process, you will have to make changes to both your hosting accounts (cPanel); old and new. This is why you will need your login credentials for both accounts. So list them down somewhere, preferably in your work diary; electronic or paper. At this stage, however, you don’t have credentials to a new account but do note them down once you finish Step II.
Access to your database(s)
Migrating your WordPress website broadly refers to migrating both your website’s files and your database. Thus you will need to access your database throughout the migration process and so you will need the required credentials too. So note them down along with your account credentials.
An FTP Client: FileZilla perhaps?
We will see later on that you can backup and migrate your website’s files either through an FTP Client like FileZilla or through a plugin like cPanel. If you are opting for the former one then you’ll need to download and install an FTP Client on your local computer (assuming you don’t already have one). FileZilla is easily available on the internet and it’s free to download.
A Text/Code Editor
Along the way, there will come times when you will need to edit bits of codes for modifying important files. A text editor like Notepad++ comes very handy at those times. It is also free to download so if you don’t already have one make sure that you do. You can also opt for a code editor. If you don’t have an in-built one, you can download one from the open-source options available; Sublime Text is a popular option.
All set? Great! Let’s get down to business.
Sign up with a new host
It’s time to look for a new host. There are several web hosting providers available these days. This is a very big decision and you will need to give some thought to it, otherwise, you may have to migrate your website in the near future again and that is not something that you’d want.
Finding a new host
Choosing the right web host for your site means first understanding what you need. If it was the uptime that was the issue with your current host, then you may want to look for a web host that has a higher uptime percentage than your current one.
If on the other hand, it was the hosting plans that were not suiting your budget then find a host that has pocket-friendly hosting plans for you. Even though we are talking about manual website migration, it is important to mention there are some hosting providers who offer free WordPress website migration to new subscribers.
Types of Hosting Plans
Also, there are different types of hosting services that are offered by these providers, which can be briefly addressed at this point:
In this type of hosting service one server hosts or contains several websites and these sites share the overall resources available for that particular server amongst them. This is also the most budget-friendly option.
With a Dedicated hosting service, one physical server is dedicated to hosting and supporting all the websites from a single client. Thus if you opt for a dedicated hosting plan your websites will have the privilege of the whole resource quota for the server. This is costlier than Shared Hosting plans.
Virtual Private Servers (VPS)
A VPS can be accounted for non-technically as semi-dedicated hosting. This means even while one server is hosting several websites, virtual partitioning enables each website to have its dedicated resources.
All the above hosting plans could be termed as Managed hosting if the provider manages the associated technical tasks such as backups and updates on your behalf.
What do I look out for in my new web host?
As we discussed before you need to know your requirements first. That way you can tally what the provider(s) have to offer and how much it satisfies your needs.
Estimate an expected traffic amount
This is very essential. The amount of traffic your website can handle is directly proportional to the amount of bandwidth that you are allowed as per your provider’s plans. Keep in mind that if you are not looking for huge traffic on your site you can opt for a low bandwidth plan, but if you are aiming to get the top SERP results you will see much traffic on your site and need to choose a plan accordingly. Look out for the available bandwidths when you surf web hosts.
Decide how much external support you need
Customer support is another important factor. Basic customer support includes email, ticket, and phone support. However, response times will vary. Non-managed hosting services may lend support in basic configuration but it will not include managing your system. So if you want to outsource the total management of your website, you may want to opt for Managed Hosting providers.
Be aware of marketing curiosities
Marketing curiosities or schemes like unlimited storage and bandwidth often seem lucrative and beneficial to consumers. However, the grim truth is that it’s not as advertised. Most often such offers result in your site shutting down after a certain level of usage.
Now that you have chosen a new web host and signed up on a plan (and noted down your credentials), there are a few more tasks you need to complete before you can move on to the next step. Let’s see how that can be done.
Note: Most web host providers use plugins like cPanel to help clients set up their hosting environment without the need to understand the underlying technicalities. In case your host is using different control panel software, you can contact the support team for carrying out the following tasks for you.
Create a new domain at your new host
The first task is to add a new domain name to your new server. To do this:
- Log in to your new hosting cPanel account and navigate to the Domains
- There you will find the Addon Domainoption; click on it.
- On the next screen, enter your domain name into the New Domain Name field and click on the Add Domain The remaining fields are auto-filled when you enter the domain name.
- It takes a few seconds to add and after that, you will be able to see your domain name on the list.
Your server is linked to your domain name and is ready to receive your website.
Create a new MySQL database at your new host
Next, you need to create a new blank MySQL database at your new server. You will later be importing your old database here. We generally use phpMyAdmin which is an admin tool for MySQL databases and localhost as the server. However, it’s best practice to check in once with your provider to be sure.
Keep in mind that simply creating a blank database will not do, you will also need to add a secure password to it along with a user with access to the full database. To do these:
- Log in to your new hosting cPanel account and navigate to the Databases section and click on the MySQL Databases
- Add a name to your new database; it will be shown in your cPanel account under the Current Databases
- Next, you need to add a user with full access to your database to monitor it. Find the Add User to Database option and select the user you want to add from the User list
- Then select the database you want to add the user to from the Database list
- Now you need to assign the privileges you want to grant your user from the list; you can simply select the All Privileges check box and click on the Make Changes
cPanel will add the user to your database and you can view it under the “Current Databases” table.
Move your email address to your new host (optional)
You may or may not opt to duplicate your email address to your new host at this point. However, it is generally recommended that you do because you will have to do it at some point.
This is mainly because when you are moving your WordPress to a new host you are also moving your domain name there. This means that all your emails will be received by the new host. So if your email is not linked correctly with your new server, most of your emails will either be lost somewhere or will simply be marked “undelivered: the recipient doesn’t exist”.
So to set up your email at your new host:
- Scroll down to the Emails section in your new hosting cPanel account and click on the Email Accounts
- Click on the + Create button and a form appears where you will add your email address.
- In the form select your domain name under the Domain
- Next, enter the same username that you used with your old web host under the Username
- Set up your password under the Password field and finally.
- Set the recommended Unlimited option under the Storage Space
- Now click on the + Create button at the end of the form to complete the process.
All right you are all done with the first step. Let’s move on to the next.
Backup your data
You have your new hosting account where you have added your domain name and created a new database with user access to it. It’s time to backup all your data. This means you will need to backup your website’s files and your old database. We’ll take a look at these, one by one. First, let’s see how you can back up your WordPress files.
Backup your website files
So how do you do it? There are two ways you can go by; one is to use a File Transfer Protocol like FileZilla and the other is to use a WordPress plugin like cPanel. While the latter is a very easy process, knowing your way around FileZilla will come in handy when you have to use it at the end to upload your website files to your new server.
We will discuss both these options below.
Backup using a FTP Client: FileZilla
Assuming you have already downloaded and installed it, this is what you need to do.
- Open FileZilla and connect to your site; to do so use the SFTP (Secure Shell FTP) credentials (host, username, password, and/or port) from your old hosting account and click on Quickconnect.
- On the right side of the interface box is your server-side. Here, navigate to the WordPress root folder where all your files are kept; it is usually named either www or public_html; it may even be the name of your website.
- On the left side is your local side. Here you have to specify the directory where you want to back up your files.
- Now right-click on the root folder and click on the Download option; this downloads all your WordPress files to your specified local directory.
Depending on the size of your files this may take a while.
Note: Certain files in your website may not be visible by default, for example, the .htaccess files. Make sure they are visible as well. To do this you simply need to navigate to Server > Force showing hidden files.
Backup using a plugin: cPanel
Using cPanel to backup your WordPress site is much faster than using FileZilla. However, it only works when both your existing and new hosts are using cPanel. You have to access your old cPanel account now. Remember how we talked about saving your old hosting account credentials? It’s time to use them.
- Log in to your old cPanel account and locate the File Manager under the Files section; double-click to open.
- Locate the public_html file (it can be named after your site as well) here; this is your website’s root directory and all your files are stored here.
- Click on Select All and then click on Compress.
- A .zip file is created and saved this file in a chosen place in your local computer.
The zip file may take some time to be created depending on your file size. Now that you have finished backing up your website files, let’s see how you can backup your database.
Backup your existing database
You will be using your old cPanel hosting account here as well. Your database contains all the information site’s contents, users, and more. You will be using the same tools and servers as you did while creating your new blank database at your new host server.
Your first job is to locate your database and identify which ones you would need for your website and thus need to backup. Next, you have to export those databases to your local computer. Follow the steps mentioned below:
Identify and locate the required database(s)
In case your existing provider uses management software other than cPanel do communicate if any steps differ from below, but in most cases they are similar. Once you are logged into your old cPanel account:
- Navigate to the Databases section and click on the phpMyAdmin
- You will find a list of databases on the screen from where you can select the ones that you will need to export.
In case you are not sure which databases you would need or can’t seem to find them you can do the following:
- Navigate back to your website’s files via the File Manager
- Here locate a file called wp-config.php; open it via your built-in code editor, or a text editor of your choice.
- Find the code-snipped titled, define(‘DB_NAME’, ‘database_name_here’).
Here you can see the name of your database(s) that you would need to backup.
Export your database to your local computer
To export your databases:
- Select the database you located and a new window will appear which shows the structure of the database.
- Select the Export tab from the top menu bar.
- Mark all the tables that you want to export; usually all of them are required.
- Under Export Method, select the Quick
- Then keeping the Format as SQL click on the Go
Your database would be exported and saved in the root directory of your local computer in a .sql file format. In case you have more than one database (which is mostly the case) you will need to follow the two above processes for all of them individually.
Edit the wp-config.php file for your website
It is now time to connect your databases and your website to the new server. There is no strict order that you have to follow and you may follow this step after you have uploaded your website and database to the new server. but we recommend that you do it first.
The wp-config.php we talked about earlier is the one responsible for making this connection. So we have to access the file again. Now, this file was created when you first set up your WordPress site with your old host. So you have to update that old information and connect it with your new server host information. You need to update your database name, username, password, and host. To do that:
- Open FileZilla and from the local side root directory navigate and locate the wp-config.php
- Right-click on the file and select View/Edit to open the file.
- Once the file opens in your code/text editor, navigate to the code snippet that contains the aforementioned information. It will look something like this:
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
- In the first line the database_name_here part contains the name of your database; change it to the name of your new database that you created in step II.
- In the next line, the username_here part contains the username for your database which you also have to change to the new username you created before.
- Finally, change the password to the new one that you created in the password_here part of the code.
- Generally, the host server is localhost so you don’t need to change that unless your provider is using something else. In that case, update the information in the appropriate part of the code.
Upload your website files and database to your new host
It is finally time to get your website up and running at your new host. In this step, you will have to upload your website’s files and the database that you had backed up earlier. So let’s get down to brass tasks.
Upload your WordPress site’s files to your new host
To upload your website files follow the steps below:
- Open FileZilla and connect to your new hosting server with the appropriate credentials.
- Navigate to the public_html folder in the root directory.
- Right-click anywhere and select Upload.
- In the pop-up window, locate the local directory where you had backed up your files and select them all.
- Remember these files must contain the updated wp-config.php file as well.
It will take some time so be patient and soon most of the hard work would be done.
Import your database(s) at your new host
Once your website’s files are uploaded, the penultimate task left for you is to upload or import your old database into your new one at your new host.
To do so you can either use your new cPanel account to import via the phpMyAdmin tool or you can use the MySQL command-line program. We recommend that you opt for the former process as it is both faster and easier.
- Open your new cPanel account and navigate to the Databases
- Select the phpMyAdmin option and the administration window will appear.
- Here select the database where you want to import into from the left side of the window.
- Click on the Import tab within the new database.
- Under the File to Import option, click on the Browse button and select the .sql file you saved on your local computer earlier.
- Finally, click on the Go
This would take up a few minutes depending on the file size but once it’s done most of the hard work would be over. There is just one last thing left to do.
Update your Domain Name System/Server (DNS) settings
This is the final hurdle that you have to cross to finalize your move to the new host. You need to update your DNS settings so that it points to your new server IP address.
To complete that you will need two things: one is the information from your new host that you can find from the new domain name registrar and two, the access to the registrar.
Contact your domain name registrar and if it was not purchased from your new hosting provider. If however, you did purchase it from your new host, things become a lot simpler.
Note that when you signed up with your new host you probably had received an email from them. This email is very important so make sure you have saved the email.
This email contains the necessary information about your new Nameserver addresses. They commonly look something like this:
Find your new Nameservers and copy over the addresses provided in the email and then simply click on Save. Your work is finished. All you need to do now is to wait till your site is live at its new host. Now, remember that it takes up to 48 hours till your site is fully connected to the new host.
Do not make any changes to your site within that time as it would only make changes to your old version and not the one about to go live. Also, you may delete all your files from your old host after your site is live at your new host. But do keep a backup of those files as a safety measure.
How to migrate my WordPress website using plugins?
It is no surprise if you feel anxious about the whole process. After all, you had worked hard to set up a WordPress site and maintain it for so long. Well if you do not have the heart to carry out the whole process manually, then you can use the awesome plugins or tools available to ease your work.
Using plugins acts as a sort of insurance policy as these tools often come with features that can automatically create backups for your site files and databases as well as to conduct recovery services. some plugins can migrate a certain part of your website (say your blogs) instead of the whole website.
The processes involved are the same, the only difference is that you need not intervene every time. You may need to provide certain information to the software at points but other than that the process would continue automatically.
Hopefully, you have found the answers to all your questions about migrating your WordPress site to a new host from this article. If however, the processes laid out above seem too technical for your taste you can always contact your new host and ask for a walkthrough as you conduct the move.