
How to Move WordPress to a New Host or Server With No Downtime
Moving your WordPress website to a new host or server can be tricky business, and there are a couple of risks involved. One of the biggest risks when making this switch to a new server is the loss of data or downtime.
These things can potentially make your website temporarily inaccessible to search engines and users, which ultimately results in the loss of search engine rankings and sales. In this article, we’re going to cover how you can migrate your WordPress site safely without any downtime.
Step One: Choosing a New Host For Your WordPress Site
If you find that your web host is still slow and unresponsive, even after you have optimized the performance and speed of your WordPress, it’s definitely time to move your site to a different host. The new host will need to be able to handle growing traffic.
Be sure to choose a new host carefully, since you don’t want to have to migrate the website again for a while. There are a few options depending on what you’re looking for.
For location-specific providers or cloud hosting, you could opt to migrate your website to Siteground. This web host has data centers on three continents, meaning they can allow for optimized international traffic.
If you’re looking for shared hosting that is reliable, a good option would be Bluehost. Bluehost is officially recommended by WordPress.org, so you can be certain that they are reliable.
Finally, if you’d prefer a more managed WordPress host, consider checking out WP Engine. This is the most popular and most reliable host provider in the industry.
After you have decided on and bought a new hosting platform, wait before installing WordPress. We’re going to cover that in a later step. For now, your new web hosting account should be totally empty — no folders or files in the main directory.
Step Two: Set Up a Duplicator For Easy Migration
First off, you are going to need to install and activate the Duplicator plugin, which is free on the website you are moving to. This plugin can also be used to move the website to a new domain name without having to lose SEO.
Once the Duplicator has been installed, and you have activated it, go to the ‘Packages’ page under the ‘Duplicator’ heading on the WordPress admin screen. Then, click the button in the top right corner that says ‘Create New.’
After you’ve done that, click the ‘Next’ button and follow the prompts to create a new package. Be sure that your scan is good before clicking the ‘Build’ button. You’ll know if the results are okay if you see a ‘Good’ button appearing next to them.
The building process can take a few seconds to complete, so have patience while the plugin does its thing. As soon as the process has finished, you’ll see a download option for the Archive and Installer package.
Click on the ‘One-Click Download’ link to download both of the required files. The installer file will do the installation process for you, while the archive file is basically a copy of the entire website.
Step Three: Importing Your WordPress Site to a New Host
After you’ve downloaded the installer and archive files, it’s time to upload them to the new web host. This can be done using FTP to connect your new web host.
Under normal circumstances, you would enter the domain name of your website as host when connecting the FTP client. However, since the domain name still directs to your old host, you’re going to have to connect by entering the IP address of your server, or the server hostname.
This information can be found from the new host account’s cPanel screen. If you’re having trouble finding this information, be sure to ask for help from your new hosting company. They’ll be able to guide you.
You have to upload both the archive.zip file and the installer.php file to the root directory of your website, using the FTP client. This folder is usually /username/public_html. Again, don’t hesitate to contact the hosting company if you are unsure.
Ensure that your root directory is completely empty since some web hosting companies will automatically install WordPress after you sign up. If WordPress is installed in your directory, uninstall it before moving on.
After that, it’s time to upload the installer.php file and the archive.zip file to the root directory of your website.
Step Four: Changing the Host’s File to Avoid Downtime
Once both of the files have been uploaded to the new host, you will need to use a browser to get to the installer.php file. The URL that can usually be used to access this file looks like this: http://www.XXXXXX.com/installer.php
This URL, however, is going to direct you to the old web host, and you’ll be met with a 404 error. This is because your domain name is still leading to the old web host.
You’ve probably heard that the way to prevent this is to change your domain name server and direct it to the new hosting company, but this is incorrect. If you do this, your visitors will be sent to a broken website as it’s migrated.
You can use the host’s file to map IP addresses with specific domain names. To put it simply, you’re able to trick your computer into thinking that the website has been moved, even though it hasn’t.
When you make these changes, you will be able to use your own domain name to gain access to the files on your new host. Everyone else will still be using the old host to access your website, which ensures 0% downtime.
First, you will need to locate the IP address of your new web hosting server. This can be found by logging in to your cPanel screen and clicking on ‘Expand Stats,’ which can be found in the sidebar to the left.
The IP address of your server might be listed as ‘Shared IP Address.’ If you’re on Windows, you will need to navigate to Programs >> All Programs >> Accessories, then right-click on Notepad and select ‘Run’ as an Administrator.
You’ll then be met with a Windows UAC prompt, on which you’ll need to click ‘Yes’ in order to run notepad as an administrator. Navigate to File>> Open on the Notepad panel, then to the folder C:/Windows/System32/drivers/XXXXXX.
Select the host’s file from this folder and open it. If you are on a Mac, open the Terminal app and enter the sudo nano /private/XXXXXX/hosts command.
Windows and Mac users will need to paste the IP address that you copied at the bottom of the host’s file, then enter the domain name. Here’s an example:
123.456.7.89 www.XXXXXX.com
Be sure to replace the IP address with the one that you copied from cPanel and the domain with your site’s domain name. After that, save your changes.
You will now be able to use your domain name on your computer to access your files on the new host.
Step Five: Creating a MySQL Database
You will have to create a MySQL database on your new host account before you run the installer on the new host. Feel free to skip this step if you have already created a MySQL database.
Start by making your way to the cPanel dashboard of your new host. Then, scroll down to the Databases section and click on the MySQL Databases icon.
You’ll notice a field in which you can create a new database. Enter a name for this database and click the ‘Create Database’ button. You have to scroll down to the MySQL Users section after you have created the database.
Next, create a username and password for the new user, then click the button that says ‘Create a User.’ You are going to need to add this user to your database, which will provide all the permissions to work on that database, as well as give you the username you just created.
To do this, scroll down to the ‘Add User to a Database’ section. Then, select the database user you created, select the database, and click the ‘Add’ button.
Your database should now be ready for use with WordPress. Make sure that you take note of the username, password, and database name. This information is vital for the next step.
Step Six: Beginning the Duplicator Migration
You are now ready to open and run the installer. To do so, navigate to http://www.XXXXXX.com/installer.php in your browser and replace the XXXXXX with the name of your domain.
The installer is going to run some tests, and when done, it will show ‘Pass’ next to the archive and validation tests. You will have to click the terms and conditions box to be able to click the ‘Next’ button.
You will then be prompted to enter your database name, username, password, and MySQL host. The host field will likely have ‘localhost’ in it. Afterward, you need to enter the details of the database you created, which was covered in Step Five.
If you’d like, click on the button that says ‘Test Database’ to be sure that the information you entered is correct. You will notice a string beginning with Pass if the Duplicator manages to connect.
Otherwise, the details of the connection error will be displayed. To continue, click on the ‘Next’ button.
The Duplicator plugin will begin to import your WordPress database into the new database from the archive.zip. It will then prompt you to update the site Path or URL. Nothing needs to be changed here, as we aren’t changing domain names.
Just click on the ‘Next’ button to proceed. The Duplicator will perform the finishing steps, and you’ll be shown the login button. Now, you are able to log in to your WordPress site via the new host and check to see if everything is working as it should.
Step Seven: Updating Your DNS
By the time you’ve reached this step, you will have made a total copy of your WordPress database and files on the new server host, but your domain will still lead to your old hosting account. You need to change your DNS to update your domain.
This will make sure that users will be directed to the updated location for your website when they enter its URL into their browsers. If your domain was registered with your hosting provider, you should move the domain to a new host.
You are going to require the DNS information from your new web host, which usually consists of some URLs similar to these:
ns1.XXXXXX.com
ns2.XXXXXX.com
ns3.XXXXXX.com
The information differs slightly depending on your web host or domain registrar, but the basic concept stays the same.
How Downtime is Ruining Your Website
Downtime is the period of time that your website is unavailable and down or offline. This is generally expressed as a percentage or in units of time if you are calculating the correlation between the total working time of the site and its downtime.
Let’s say that your website went down while you were asleep. During this time, Googlebot scours your website, checking it periodically, and discovers that it is down.
Again and again, it gets no response. Eventually, Google decides that your website is no good, and you’ll wake up to find that your website’s SEO ranking has plummeted. While Google is lenient the first few times this happens, if the problem persists, your search rankings will be ruined.
This is why uptime is so important. It spells the difference between having your site on the first page of results or somewhere lost in the millions of other sites just like it.
Wrapping Up
Ensuring that there is no downtime when migrating your WordPress website to a new host is crucial. Having as much uptime as possible will ensure that your SEO and search rankings are as high as they can possibly be.
We hope that this article has made migrating your website a little easier.