Web Hosting

How to Switch to New Server or WordPress Host without any single Downtime?

Do you want to move your WordPress site to a different server or a new host? When migrating your site or switching web host to a new server, the major risk is potential downtime and data loss. Here, we will discuss how to migrate your WordPress site to new host without any single downtime.

Choosing New WordPress host

If you have ended up with slow host, even when your WordPress site is optimized, you need to switch to a new host which can handle increasing traffic. Choose the new host wisely to avoid the chances of moving again soon. If you are looking for the best shared hosting, WordPress.org officially recommends Bluehost.

Butif you are looking for location-based providers or cloud hosting, it is betterto go with Siteground, as their datacenters are located in 3 continents.

Ifmanaged WordPress hosting is your choice, it is recommended to go for WP Engine as they are the well knownhosting service providers.

Have a Duplicator to Migrate Smoothly

First of all, install a free Duplicator plugin on your website before migrating. It is a free plugin also used to move your website to new domain without compromising your SEO efforts. However, we will discuss how to use it with no downtime.

  • After installing and activating Duplicator, go to Duplicator > Packages.
  • Click “Create New” button in top right side.
  • Click Next and follow the steps.
  • Scan results check out and click Build button.
  • This process may take some time.
  • It will show download options once the process is finished for Archive and Installer package. Click “One click download’ to download both.
  • Archive is the copy of your site and installer will make the installation process smoother.

Import WordPress Site to a New Host

Now that you have removed both the installer and archive files, next step is uploading them to new web host. You can connect to new web host with FTP. Usually, you will want to enter the domain name of your website as host when it comes to connect your FTP client. As your domain name is pointing to old host, you have to connect by entering the IP address of your server or host name of server. You can get this info from cPanel dashboard of new hosting account.

Change Host Files to Avoid Downtime

Once you upload both files to new web host, access the installer.php file in the browser. You can access the file with a URL like – http://www.xyz.com/installer.php. Well, it will take you to old web host and it will show 404 error, which means your domain name still open at old web host. Normally you will want to change the domain name servers and point to new host. But it will result in users getting broken website as you migrate the same.  

You can access new site with hosts file on your PC. It can map domain names to particular IP addresses. With those changes, you can access files on new host with your own domain name and the rest of the world can still access your site from old host and it has 100% uptime.

Create MySQL Database on New Host

Before running installer on new host, you first have to create MySQL database on new account. If you have created MySQL database already, you can enter the next step.

Create database in cPanel

  • First of all, click on MySQL database on Databases section in the cPanel dashboard of your new hosting account.
  • You can create a new database in a field. Enter your database name and click on “Create Database”
  • Scroll down to MySQL Users after creating MySQL database. Enter user and password for new user and click “Create a user” button. You have to add user to your database which will give the username all the permissions to work on the database.
  • Go to “Add user to a Database” section, select database user created from the dropdown next to the user, select database, and click on add button. 
  • Now your database is ready. Note your database user and password.

Start the process of Duplicator Migration

Now we are all set to run installer. Go to this address in your browser and replace xyz.com with domain name. Installer will run certain tests and show you the option “Pass” next to validation and archive tests. Check the checkbox of “Terms and Conditions” and proceed by clicking on next button.

You will have to enter MySQL host, username, database name, and password. Host is usually localhost. Later on, you will enter details of database created by you in last step. Click “Test Database” button to ensure that you have entered the right details. If duplicator can connect, you can see a string mentioned with Pass. You will see the details of database connection. Click on Next button. Now your WordPress database will be imported by the Duplicator from archive zip in new database.

Next, you will need to update URL or Path. You don’t have to change anything if you are not changing domain name. Click Next to continue. Duplicator will run the last steps and show the login button. Now you can enter the WordPress site with new host to ensure that everything is going well.

Update Your Domain

Now that you have created copy of WordPress database and files on hosting server, your domain still points to the old hosting account. You have to switch DNS name servers to update your domain. Your users are taken to new address of website when they type domain on the browsers. Once you register your domain with your host, it is ideal to transfer domain to your new host. If you have used registrar like Namecheap, Godaddy, etc, it is time to update name servers. You can get the information from new web host. It may take up to 4 to 48 hours to change DNS for all users.

Leave a Reply