Wordpress

How to Move WordPress site to a New Host or Server without Downtime

Steps to Move WordPress Site to a New Host or Server

Step1: Choose New WordPress Host to move the wordpress site to a new host

After optimizing your WordPress speed and performance, still, your host is slow, then, you need to move your WordPress site to a new host that can handle your website traffic.

  • We recommended you go with BlueHost for reliable shared hosting.
  • Recommended you to go with SiteGround for cloud hosting or location-specific providers. They have data centers for 3 different continents.
  • We recommended you go with WP Engine for Managed WordPress hosting.

After buying a web host, do not install it now, you can do it later.

as of now, your web hosting should be completely empty and should not contain any files or folders in the main directory.

Step2: Setup Duplicator for Easy migration to move your wordpress site to a new host

The first thing you need to is, install and activate the Duplicator plugin on the website that you want to move. Duplicator is a free WordPress plugin, you can also use it to move your website to a new domain without losing SEO.

Once you have installed and activated the Duplicator plugin, go to Duplicator-> Packages

Next, you need to click the Create New button available at the top right corner.

duplicator package

Then, click on the Next button and follow the steps below to create your package.

duplicator build

Your scan should be completely done and click on Build. It will take more time to complete.

Once the process is complete, you need to download the installer and Archive package. You need to click one-click download to download both files.

installer and archive file

The archive file is a copy of your website and the installer will do installation automatically.

Step3: Import your WordPress Site to a new host to move your wordpress site to a new host

Next, you need to upload downloaded files to a new WebHost. You need to connect to a new WebHost using FTP.

While connecting to FTP, you need to enter your domain name as your host.

cpanel

Still, your domain name is addressing your old host. You need to connect it by entering the server’s IP address or server hostname. This information is available in your new hosting account’s Cpanel Dashboard.

If you are not able to find this information then you can ask a web hosting company and they will help you out.

Now, use an FTP client to upload both installer.php and Arciver.php files to the root directory.

This is usually /username/public-html/folder

Your root directory should be completely empty. Some web hosting companies install WordPress automatically when you signup.  If you have installed WordPress in your root directory, you need to delete it first.

Once you have done, You need to upload the installer.php and archive.php file to your website’s root directory.

Step 4: Change the host’s file to prevent downtime to move your wordpress site to a new host

Once you have uploaded both files to a new host. in the browser, you need to access the installer.php file.

In order to access the installer.php, use the following URL

http://www.example.com/installer.php

This URL will take to you to your old web host, so, you will get a 404 error. because2 your domain name is still pointing to your old web host.

Now, how to access your new site on the computer temporarily without affecting the old site. This can be done by using the Hosts file on your computer.

The host file can be used to convert domain names into IP addresses.

Now the thing is that how to add an entry for your domain name into the host file. so that it points to a new web host. This allows you to access your new host by using your own domain name.

To do this, you need to find the IP address of your new web hosting server. In order to find the IP address, you need to log into the cPanel Dashboard and expand stats link is available, click on it. The IP address of your server is will be shown as a Shared IP address.

For some web hosting companies, you will this IP address under the account information heading.

shared ip adress

Next, Windows users go to Programs-> All Programs->Accessories, right-click on the notepad and run as administrator. A new window will open and click on yes.

On notepad, go to File-> Open then move to C:\Windows\System32\drivers\etc folder. In this folder, select the hosts file then open it.

If you are using Mac, to need to open the Terminal app and enter the below command to edit the host file.

sudo nano /private/etc/hosts

In both Windows and Mac, At the end of the host file, you need to enter the IP address that you copied and enter the domain name like below.

192.168.1.22 www.example.com

Make sure that you need to enter the IP address that you have copied from Cpanel with your own domain name.

Once you have done it,  click on save changes.

Now you can access your files on the new host using your domain name on your computer.

Step 5: Creating MySQL database on your New Host

Before running the installer on the new host, you need to create a MySQL database on your new hosting account. If you have already created a database, you can skip this.

Creating a Database in Cpanel 

create databse

Go to the new hosting account’s Cpanel Dashboard, scroll down to the Database section, then click on the MySQL database icon.

create new database

you will see a field to create the database. You need to enter the database name and click on create a database.database user

 

After creating a database, go to the MySQL user section. Here, you need to provide a username and password.  Click on Create a user button.

You need to add this username to the database. Now, you got permission to work on the database. To do this, Go to Add a user to a database section. Then, you need to select a database user that you have created from the drop-down menu. Then, select the database, and click on Add button.

add user to databse

Now, you can use this database in WordPress and note down the database name, username, and password.

Step 6: Start the Duplicator Migration process to move your wordpress site to a new host

Now, you can run your installer. Browse your installer on your browser using the following URL.

http://www.example.com/installer.php

It will run some tests and display the pass next to the archive and validation. You need to check the terms and conditions checkbox and click on the Next button.

Now, it will ask for MySQL host, database name, username, and password. Your host will be like localhost. You need to enter the details of the database that you have created in the previous step. You need to click on the test database to check whether you have entered the correct information.

 

If you see a string as a pass then you can connect with the duplicator. Otherwise, you will get database connection error details. Click on the Next button.

Next, it will ask for a URL or path update, you don’t need to change anything, because you are not changing the domain. Just click on the Next button.

After completing all the steps, it will ask you to log in. You can log into your WordPress site on a new host.

Step 7: Update your Domain Name Servers(DNS)

Now, you have created a complete copy of your WordPress database and files on the new hosting server, but your domain is still going to the old hosting account.

To update the domain, you need to change your DNS nameservers. Now, users are taken to the new address they type your domain into the browser.

If you register your domain with a hosting provider, then you can transfer your domain to a new host. If you use a domain registrar like domain.com, GoDaddy, you need to update your nameservers.

You need the DNS nameserver information from the new web host like below.

ns1.hostname.com
ns2.hostname.com

For GoDaddy, you need to log into your account. click on domains. Next, click on the Manage button next to the domain that you want to change.

Go to the Additional Settings section, click on Manage DNS.

Next move to the NameServers section, click on the change button.

You need to switch the nameserver type from default to custom from the dropdown list. Then, you can fill in the new hosting provider’s information under the nameservers and click on save.

You have changed your nameservers on your domain. It can take 24 to 48 hours to propagate for all users.

[ Learn About: How to Buy web hosting in GoDaddy ]

[ Learn About: How to buy web hosting in BlueHost ]

Leave a Comment