How to move your WordPress site to another host, using Duplicator
For now, your new web hosting account should be completely empty with no files or folders in your main directory.
Step 2: Setup Duplicator for Easy Migration
The first thing you need to do is install and activate the free Duplicator plugin on the website that you want to move.
Duplicator is a free plugin that I highly recommend. In this article, I will help guide you through the migration process using Duplicator. If you have a WordPress site, which you need to move off one host to another – This plugin will help with about zero downtime.
Once you have installed and activated Duplicator, go to the Duplicator » Packages page in your WordPress admin area.
Next, you need to click the ‘Create New’ button in the top right corner.
locate the Next button and follow the steps to create your package.
Ensure that your scan results check out (everything should say “Good”), and then click the Build button.
This might take some time, leave this open and grab some coffee 😉
Once you see a completion, you will also see download options for Installer and the Archive package. Click on the ‘One click download’ link to download both files.
The archive file is a copy of your entire website files, from here the installer file will automate the installation process for you.
Step 3: Import Your WordPress Site to the New Host
As soon as you’ve downloaded both the archive and installer files, you will need to proceed uploading them to your new web host. If you are reading over these instructions, and you haven’t bought a hosting plan yet – Please review my Hosting provider blog post , where I give Pro’s and Con’s on website providers , but also recommendations on hosting plans they offer. Make sure to check out my previous post, then return to this page once you’ve established your hosting account.
Now that you’ve established your hosting account, you will need to locate your FTP accounts, so you can begin this process.
If you’ve never done this before, you can check out wp beginner’s guide to uploading files via FTP to WordPress.
Normally, you would enter your website’s domain name as host when connecting your FTP client.
However, since your domain name is still pointing to your old host, you’ll need to connect by entering your server’s IP address or server hostname. You can find this information from your new hosting account’s cPanel dashboard.
If you have trouble finding this information, reach out to your hosting provider’s support , they will be able to help you out.
Using the FTP client, you need to upload both installer.php file and your archive .zip file to the root directory of your website.
This is usually
Again, if you are not sure, then ask your web hosting company.
Make sure that your root directory is completely empty. Some web hosting companies will automatically install WordPress to your cPanel when you sign up.
If you do in fact, already have WordPress installed in your root directory, then you need to delete WordPress first. Again, ask your hosting support if you are unsure how to do this.
Once done, you need to upload both the archive zip file and installer.php file to your site’s root directory.
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.
Normally, this file can be accessed using a URL like this:
However, 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, other tutorials might tell you to change your domain nameservers and point it to your new hosting company, but that’s wrong.
If you do this now, then your visitors will see 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 can be used to map domain names to specific IP addresses. In other words, it lets you trick your computer in thinking that the website is moved even though it’s not.
Let’s take a look at how to add an entry for your domain name in the hosts file, so that it points to your new hosting company.
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. Your server’s address will be listed as Shared IP Address.
On some web hosting companies, you will find this information under ‘Account Information’ heading.
In the next step, Windows users need to go to Programs » All Programs » Accessories, right-click on Notepad and select Run as Administrator.
A Windows UAC prompt will appear, and you need to click on Yes to launch Notepad with administrator privileges.
On the Notepad screen, go to File » Open and then navigate to the
C:\Windows\System32\drivers\etc folder. From this folder, select hosts file and open it.
If you’re using Mac, then you need to open the Terminal app and enter this command to edit hosts file:
sudo nano /private/etc/hosts
For both Windows and Mac users, at the bottom of the hosts file, you need to enter the IP address you copied and then enter your domain name. Like this:
Make sure that you replace the IP address with the one you copied from cPanel, and example.com with your own domain name.
Once you’re done, save your changes.
You can now access your files on the new host using your domain name on your computer.
Important: Don’t forget to undo the changes you made to hosts file after you have finished the migration (step 6).
Step 5: Creating MySQL Database on Your New Host
Before we run the installer on the new host, you will need to create a MySQL database on your new hosting account. If you have already created a MySQL database, then you can jump to the next step.
Creating a Database in cPanel
Go to your new hosting account’s cPanel dashboard, scroll down to Databases section and click on MySQL databases icon.
You will see a field to create a new database. Enter a name for your database, and click “Create Database” button.
After creating the MySQL database, you need to scroll down to the MySQL Users section.
Next, provide a username and password for your new user and click on the ‘Create a user’ button.
After that, you need to add this user to your database. This will give the username you just created, all the permissions to work on that database.
You can do this by scrolling down to ‘Add User to a Database’ section. Simply select the database user you created from the dropdown menu next to user, then select database, and click on the add button.
Your database is now ready to be used with WordPress. Be sure to make note of the database name, username, and password. You’ll need that information in the next step.
Step 6: Begin the Duplicator Migration Process
Now we’re ready to run the installer. Navigate to the following address in your browser window, replacing example.com with your domain name:
The installer will run a few tests and will show you ‘Pass’ next to archive and validation tests.
You need to check the terms & conditions checkbox and continue by clicking on the Next button.
Now, you will be asked to enter your MySQL host, database name, username, and password.
Your host will likely be localhost. After that, you will enter the details of the database you created in the previous step.
You can click on the ‘Test Database’ button to make sure you entered the correct information.
If Duplicator is able to connect, then you will see a string starting with Pass. Otherwise, you will see the database connection error details.
Click on the next button to continue.
Duplicator will now import your WordPress database from the archive zip into your new database.
Next, it will ask you to update site URL or Path. Since you are not changing domain names, you DON’T need to change anything here.
Simply click on the next button to continue.
Duplicator will run the final steps and will show you the login button.
You can now login to your WordPress site on the new host to make sure that everything is working as expected.
Step 7: Update Your Domain Name Servers (DNS)
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. This is the final step in the migration process – you will need to update your DNS to point to your new hosting provider’s nameservers. All hosting providers use different nameservers – the easiest way to locate yours, would be google or contacting your hosting support.