Do you intend to migrate your WordPress site to a new hosting provider or server? When transferring web hosting or relocating a website to a new server, the most significant risk is data loss and downtime.
Both of these things can make your website inaccessible to users and search engines for a short period of time, resulting in lost sales and search engine rankings.
We’ll teach you how to migrate your WordPress site to a new host safely and without downtime in this step-by-step tutorial.
We’ll also address the most typical questions about migrating a WordPress site to a new hosting provider, so you can prevent common blunders.
Important: Before we begin, you should be aware that many WordPress hosting companies provide a free migrating service. It’s possible that it’s not listed on their website, so just inquire. The majority of the time, it is free, however, others may demand a modest cost.
Step 1: Select a WordPress Hosting Provider
Even after enhancing WordPress speed and performance, if you’re still trapped with a slow web server, it’s time to migrate your WordPress site to a new provider that can handle your expanding traffic.
It’s critical to choose wisely while looking for a new WordPress hosting service so you don’t have to relocate again anytime soon.
Here are some people we recommend:
- Bluehost is a good choice for dependable shared hosting. WordPress.org has given them its seal of approval.
- Siteground is a great place to go if you’re seeking cloud hosting or location-specific providers. They operate data centers on three continents.
- WP Engine is a managed WordPress hosting service that we recommend checking out if you’re looking for managed WordPress hosting. They are the industry’s greatest and most well-known provider.
Do not install WordPress after purchasing your new hosting. That will be done at a later step.
For the time being, your new web hosting account should be empty, with no files or folders in the primary directory.
Step 2: Configure the Duplicator for Simple Migration
We highly recommend Duplicator, a free plugin. It can also be used to transfer your website to a new domain name without losing its SEO.
However, we’ll show you how to utilize it to migrate your WordPress site from one server to another with no downtime in this article.
Go to the Duplicator » Packages page in your WordPress admin area after you’ve installed and enabled Duplicator.
After that, go to the top right corner and click the ‘Create New’ button.
After that, click Next and follow the on-screen instructions to create your package.
After you’ve double-checked that your scan findings are correct (everything should indicate “Good”), click the Build button.
Because the process may take many minutes to finish, keep the tab open while the plugin works.
After the process is finished, you’ll be able to download the Installer and Archive packages. To get both files, click on the ‘One-click download’ link.
The installer file will automate the installation procedure for you, while the archive file is a copy of your entire website.
Step 3: Transfer Your WordPress Website to a New Host
After you’ve downloaded the archive and installer files, you’ll need to upload them to your new web hosting account.
You can do this by utilizing FTP to connect to your new web host.
When connecting your FTP client, you should normally specify your website’s domain name as host.
Because your domain name is still pointing to your old host, you’ll need to connect using the IP address or hostname of your server. This information can be found in the cPanel dashboard of your new hosting account.
If you are unable to locate this information, contact your new web hosting company’s support team, who will gladly assist you.
You must upload both the installer.php file and the archive.zip file to the root directory of your website using an FTP client.
This is usually /username/public_html/ folder.
If you’re still unsure, contact your web hosting company.
Ascertain that your root directory is completely devoid of any files. When you sign up for a web hosting account, some companies will automatically install WordPress.
If WordPress is installed in your root directory, you must first delete WordPress.
After that, upload the archive zip file as well as the installer.php file to your site’s root directory.
Step 4: Prevent Downtime by Changing the Hosts File
You’ll need to open the installer.php file in a browser after you’ve uploaded both files to your new host.
Normally, a URL like this can be used to access this file:
This URL, on the other hand, will redirect you to your former web host, resulting in a 404 error. This is due to the fact that your domain name still points to your previous web host.
Other guides may advise you to update your domain nameservers and point your domain to your new hosting provider, however this is incorrect.
Your visitors will notice a broken website while you migrate it if you do this now.
We’ll show you how to visit your new site on your computer without interfering with your old one.
A hosts file on your computer is used to accomplish this.
Domain names can be mapped to specific IP addresses using the hosts file. In other words, it allows you to deceive your computer into believing that the webpage has moved when it hasn’t.
Let’s look at how to point your domain name to your new hosting business by adding an entry for it in the hosts file.
Making these modifications will allow you to access your new host’s files using your own domain name, while the rest of the world will continue to access your site through the old host. This ensures that the system is always available.
The first thing you must do is determine your new web hosting server’s IP address. Log into your cPanel dashboard and click the expand stats link in the left-hand sidebar to find it. The address of your server will be presented as Shared IP Address.
This information can be found under the ‘Account Information’ section on some web hosting companies.
Windows users must then navigate to Programs » All Programs » Accessories, right-click on Notepad, and select Run as Administrator.
You’ll see a Windows UAC prompt, and you’ll need to click Yes to start Notepad with administrator capabilities.
Go to File » Open on the Notepad screen, then navigate to the C:\Windows\System32\drivers\etc. Select the hosts file from this folder and open it.
If you’re using a Mac, use the Terminal software and type the following command to edit the hosts file:
sudo nano /private/etc/hosts
You must insert the IP address you copied at the bottom of the hosts file for both Windows and Mac users, followed by your domain name. As an example:
Make careful to replace example.com with your own domain name and the IP address with the one you copied from cPanel.
Save your edits when you’re finished.
Using your computer’s domain name, you may now access your files on the new server.
Important: After you’ve completed the migration, remember to undo the changes you made to the hosts file (step 6).
Step 5: On Your New Host, Create a MySQL Database
You must first build a MySQL database on your new hosting account before we can run the installation on it. You can skip to the following step if you’ve already built a MySQL database.
Using cPanel to Create a Database
Go to the cPanel dashboard of your new hosting account, scroll down to the Databases area, and click the MySQL Databases icon.
A field for creating a new database will appear. Click the “Create Database” button after giving your database a name.
You must scroll down to the MySQL Users area after creating the MySQL database.
After that, give your new user a username and password and click the ‘Create a user’ button.
After that, you must enter this user’s information into your database. This will grant the login you just generated complete access to the database.
Scroll down to the ‘Add User to a Database’ section to do so. Simply choose the database user you created from the dropdown menu next to the user, then the database, and finally add.
Your database is now ready for WordPress to use. Keep a record of the database’s name, username, and password. In the next stage, you’ll need that information.
Step 6: Begin the Migration of the Duplicator
We’re all set to launch the installer now. In your browser window, type the following address, replacing example.com with your domain name:
The installer will do a few tests and display ‘Pass’ next to the archive and validation tests.
You must check the terms & conditions checkbox before moving on to the next step by clicking the Next button.
You’ll now be prompted for your MySQL host, database name, username, and password.
Localhost is most likely to be your host. The details of the database you generated in the previous stage will be entered after that.
To double-check that you input the proper information, click the ‘Test Database’ option.
If Duplicator is able to connect, a string beginning with Pass will appear. Otherwise, the database connection problem details will be displayed.
To continue, click the next button.
Your WordPress database from the archive zip will now be imported into your new database by Duplicator.
It will then prompt you to update the site’s URL or Path. You DO NOT need to make any changes here because you are not changing domain names.
To proceed, simply click the next button.
Duplicator will complete the last processes and display the login button.
You can now access your WordPress site on the new host and verify that everything is operating properly.
Step 7: Make sure your domain name servers are up to date (DNS)
You’ve copied your WordPress database and files to your new hosting server at this point, but your domain still redirects to your old web hosting account.
You’ll need to change your DNS nameservers to update your domain. When your users type your domain into their browsers, they will be directed to the new location of your website.
It’s best to transfer your domain to a new host if you registered it with your hosting company. You must update your nameservers if you used a domain registrar such as Domain.com, GoDaddy, Network Solutions, or another.
Your new web host’s DNS nameserver information will be required. Usually, this consists of a handful of URLs that look like this:
We’ll show you how to modify DNS nameservers with GoDaddy for the sake of this guide.
The screenshots may differ depending on your domain registrar or web host. The core premise, though, remains the same.
You must first look for the domain management area, and then nameservers. You can ask your web hosting company for help with upgrading your DNS if you need it.
To use GoDaddy, sign in to your account and then select Domains from the drop-down menu.
Following that, click the Manage button next to the domain name you want to alter.
To proceed, go to the ‘Additional Settings’ area and click on ‘Manage DNS.’
After that, scroll down to the Nameservers section and press the change button.
To begin, change the option for nameserver type from ‘Default’ to ‘Custom.’ After that, under Nameservers, you can put in the details for your new hosting provider.
Remember to save your changes by clicking the save button.
Your domain’s nameservers have been successfully adjusted. DNS updates can take 4–48 hours for all users to propagate.
Because the material on your old and new hosts is identical, your users will not notice a difference. There will be no downtime as a result of your WordPress migration.
To be on the safe side, we recommend waiting 7 days after your transfer to deactivate your old hosting account.
Most Commonly Asked Questions(FAQs)
Many of our consumers have queries about migrating WordPress from one host to another.
1. Is it possible to sign up for a new hosting account without first purchasing a domain name?
Yes, you can sign up for a hosting account without first registering for a domain.
You don’t have to register a domain name when you sign up for a new host, and you don’t have to register a domain name when you sign up for a new host.
When ordering hosting, some providers will ask you to choose a domain name as the first step. If you already have a domain name, they will let you enter it.
2. Is my domain name required to be transferred to the new host?
No, your domain name does not need to be transferred to the new host. Transferring your domain name to your new hosting account, on the other hand, makes it easier to renew and administer it from the same dashboard as your new hosting account.
See our comprehensive guide on domain names and how they work for more information.
3. What is the solution to the error establishing a database connection in Duplicator?
If you’re getting an error connecting to the database or a database connection error in Duplicator, it’s most likely because you entered the wrong database connection information.
Check that the database name, MySQL username, and password are all accurate. Some web hosting providers do not utilize localhost as the MySQL server’s host. If this is the case, you will need to contact your web host’s support team to obtain the necessary information.
4. How can I tell if my website is loading properly on the new server?
You can find out who is hosting a website using a variety of online tools. After you’ve migrated your website to a new host, you can use any of these tools to find out the name of the web hosting firm that’s hosting it.
If it hasn’t been long since you migrated your website and changed your domain name server (DNS), your website can still be loading from your previous host. The propagation of domain name changes can take up to 48 hours.
5. Do I have to remove any files or data from the old server?
We recommend that you keep your old website for at least a week while transferring hosting companies. After that, you can erase your former web host’s files. If you cancel your web hosting account, your web hosting company will destroy all of your data in accordance with their policies.
6. How long should I keep my former host account active?
You can cancel your previous web hosting account once you’ve migrated your website to the new host and if you don’t have any other websites hosted with your old web provider.
However, you may have already paid them for yearly hosting in some circumstances. If you cancel, you should check their refund policy to see if you are qualified for a refund.
7. What is the best way to migrate a WordPress site that uses SSL/HTTPs?
Your new hosting provider will require you to install an SSL certificate. After that, you can proceed with the same steps as before. Just make sure the URLs are HTTPS, such as https://example.com.
We trust that this step-by-step advice assisted you in migrating WordPress to your new host with little downtime.