Wordpress site migrate to new server or host with no downtime.
Step 1: Choose Your New WordPress Host
Choose very carefully a good new web host so you don't have to move again any time soon.
- Buy new hosting but do not install yet wordpress site.
Step 2: Set Up Duplicator for Easy Migration
- Login to your wordpress site and install the free plugin named Duplicator on the website you want to move or you can do backup files and database if your know this process.
- Duplicator is a free plugin which is also recommended
- Create your new domain.
- Once duplicator is installed and activated go to Duplicator > Packages section in your Wordpress admin area.
- Click Create New button
- Click Next button and follow the next steps below:
scan first all the files if its all good. Then click Build button. Wait until process is complete.
- Once the process is complete, click Installer and then Archive buttons to download the files/package. You need those!
Archive file is where your site copy files. And the Installer is the automate installation process.
Migrate WordPress to New Server
Important: Before we start, we want to remind you that most WordPress hosting companies offer free migration services. If they don’t publicly state that, then all you have to do is ask. Usually it’s free, but some may charge a small fee.
Step 3: Import Your WordPress Site to Your New Host
Now that you have downloaded both the archive and installer files, the next step is to upload them to your new web host.
You can do this by connecting to your new web host using FTP.
Note: When setting up your FTP client to connect to your new web host, keep in mind that your domain name still points to your old web host. That means you’ll need to enter the IP address of your new host instead of your domain. This is to ensure that these files go to the new host rather than the old host.
Using your FTP client, upload both installer.php file and your archive .zip file to the root directory of your website. This is usually /username/public_html/ or /username/public_html/example.com where example.com is your domain name.
If you’re not sure, just ask your web hosting company.
Make sure that your root directory is completely empty. If you have WordPress installed in your root directory, then you need to delete WordPress first.
Step 4: Change The Hosts File to Prevent Downtime
Once you’ve uploaded both files to your new host, you need to access the installer.php file in a browser.
The file can be accessed using a URL like this:
However, the problem is this URL will take you to your old web host, and you will get a 404 error. This is because your domain name is still pointing to your old web host.
Normally, folks will tell you to change your domain nameservers and point to your new host. However, that will result in your users seeing a broken website as you migrate it.
We’ll show you how you can access your new site temporarily on your computer, without affecting your old site.
This is done with a hosts file on your computer.
The hosts file maps domain names to specific IP addresses. In this step, we will show you how to add an entry for your domain name in the hosts file so that it points to your new host, but only when using your computer.
Making these changes will allow you to access the files on your new host using your own domain name, while the rest of the world will still be accessing your site from the old host. This ensures 100% uptime.
The first thing you need to do is find the IP address of your new web hosting server. To find this, you need to log into your cPanel dashboard and click on expand stats link in the left-hand sidebar. This will expand the sidebar showing you information about the status of your server. The information you need to copy is the Shared IP Address.
Important: Don’t forget to undo the changes you made to hosts file after you have finished the migration (step 5).
Step 5: Begin the Duplicator Migration Process
Now we’re ready to run the installer. Navigate to this address in your browser window, replacing example.com with your domain name:
If you have not already created a database on your new host, then it is time for you to create a database in cPanel. Be sure to make note of the database username and password.
Once you have created the database, you will need to enter the database information in the fields below and then click on the Test Connection button.
If the installer fails to connect to your database, then check the values you entered above and make sure they are correct.
Once you have successfully connected to your database, scroll down to read the warnings and notices and check the box confirming you’ve read them. Then click the Run Deployment button.
The installer will now import your database. The process may take several minutes, so keep the tab open as it works.
In step 2 of the installer, you’ll be asked to verify your old and new URL paths. Make sure it’s accurate and click Run Update to update your URLs.
In the final step, you can complete the process and verify that everything is working correctly by clicking the buttons in order.
Important: Now you can remove the changes you made to your hosts file in step 4.
Step 6: Update Your Domain
At this point, you’ve created a complete copy of your WordPress database and files on your new hosting server. But your domain still points to your old web hosting account.
To update your domain, you need to switch your DNS nameservers. This ensures that your users are taken to the new location of your website when they type your domain into their browsers.
If you registered your domain with your hosting provider, then it’s best to transfer the domain to the new host. If you used a domain registrar like Godaddy, Namecheap, etc, then you need to update your nameservers.
You will need the nameserver information from your new web host. This is usually a couple of URLs that look like this:
For the sake of this guide, we will be showing you how to change DNS nameservers with GoDaddy. Depending on your domain registrar or web host, the screenshots may not reflect the setup on your registrar or web host. However the basic concept is the same.
Just look for domain management area and then look for nameservers. If you need assistance with updating your nameservers, you can ask your web hosting company.
First you need to login to your Godaddy account and then click on the launch button next to domains.
On the next screen, click on your domain name. You will see your domain details, along with your nameservers. You need to click on the manage link under the nameservers.
On the next screen, you will see a link to enter custom nameservers. Clicking on the link will open a form where you can enter your custom DNS nameservers.
Save your changes and you’re done.
You have successfully changed the nameservers. DNS changes can take 4 – 48 hours to propagate for all users.
Now since you have the same content on your old host and the new host, your users wouldn’t see any difference. Your WordPress migration will be seamless with absolutely no downtime.
To be on the safe side, you can wait to cancel your old hosting account until 7 days after your migration.