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 a new host without any single downtime.
Choosing New WordPress host
If you have ended up with a 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.
But if you are looking for location-based providers or cloud hosting, it is better to go with Siteground, as their datacenters are located in 3 continents.
If managed WordPress hosting is your choice, it is recommended to go for WP Engine as they are the well known-hosting service providers.
First Option – Site Migration Tools
Siteground and Wpengine provide free migration tools to their customers. If you want to get very high speed hosting with free migration tools, you must switch to siteground hosting or WpEngine hosting. As WpEngine is little expensive due to its VIP features. You must know about the features of WpEngine from WpEngine Review.
Rest, I believe if you have a limited budget then you should try siteground hosting. There is no match with siteground hosting.
Second Option – 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 a 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 on the top right side.
- Click Next and follow the steps.
- Scan results check out and click the 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.
- The 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, the next step is uploading them to a new web host. You can connect to a new web host with FTP. Usually, you will want to enter the domain name of your website as host when it comes to connecting 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 hostname of the 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 a 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 the old web host and it will show 404 error, which means your domain name still open at an old web host. Normally you will want to change the domain name servers and point to a new host. But it will result in users getting broken website as you migrate the same.
You can access a new site with a hosts file on your PC. It can map domain names to particular IP addresses. With those changes, you can access files on a new host with your own domain name and the rest of the world can still access your site from the old host and it has 100% uptime.
Create MySQL Database on New Host
Before running installer on the new host, you first have to create MySQL database on a new account. If you have created MySQL database already, you can enter the next step.
Create a 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 a 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 the installer. Go to this address in your browser and replace xyz.com with the domain name. The 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 the Next button.
You will have to enter MySQL host, username, database name, and password. The host is usually localhost. Later on, you will enter details of the database created by you in the 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 the database connection. Click on Next button. Now your WordPress database will be imported by the Duplicator from archive zip in the new database.
Next, you will need to update the URL or Path. You don’t have to change anything if you are not changing the 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 a new host to ensure that everything is going well.
Update Your Domain
Now that you have created a copy of the WordPress database and files on the 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 the new address of the website when they type domain on the browsers. Once you register your domain with your host, it is ideal to transfer the 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 the new web host. It may take up to 4 to 48 hours to change DNS for all users.