Migrate WordPress site to a different host

Ivan Radunovic
Migrate WordPress site to a different host

In this tutorial I’ll show how you can migrate WordPress site to a different domain, on a new server. I’ll use the Duplicator plugin.

Steps required:

  • Install Duplicator
  • Create a backup file with Duplicator and download it
  • Login into new server and upload backup
  • Run Install script
  • Enjoy

Install Duplicator plugin

I will use temporary WP site to create this backup. You should use your own site and install Duplicator there.

From here https://plugintrends.com/p/duplicator I’ll click on Launch new WP site and I’ll get new WP installation.

Launching 1st site for backup

Create a Package

In Duplicator package is backup file with a restore script.

Creating new Duplicator package

Package creation consists of few steps, follow them and choose what you want.

In my case default settings are fine.

On Scan page all checks are passed.

Duplicator checks

I’ll click Build.

Now I am presented with Download page, and I need both files.

Download archive page

Archive consists of actual wp files and your uploads. Installer is recovery script, which installs new WP with your files, it’s also doing string replace to match new domain.

Restore site on a new server

In my case I’ll use WPJack and create new site there. It’ll be empty WP.

I need to login into new server and visit site folder. If you don’t know how you can SSH into server checkout SSH config file setup.

In my case site folder is locate at /home/jack/jack2022/

Site folder opened via SSH

Since I use free version of Duplicator plugin I need to manually upload installer and archive to a remote server.

So I need to delete everything from inside sites folder and upload these 2 files there.

On my local development environment I added SSH config for user jack2022 so I can directly upload files on a remote server.

scp ~/Downloads/wpjack-duplicator/* jack2022:/home/jack2022/jack2022.plugintry.com

This command above will upload content of folder wpjack-duplicator onto remote server. I used ssh shortcut from SSH config file jack2022, which is linked to my new server.

After uploading files this is how remote folder looks:

Listing content of site folder

Obtain MySQL credentials

For Duplicator I need mysql database, username and password.

In WPJack I can visit my new site -> WordPress tab and copy/paste those variable from WP config file.

Starting Restore Process

Now when I visit my new site slash installer.php, I’ll be presented with a Duplicator wizzard.

Restore wizzard

I need to enter database credentials on a new server.

Since I am using WPJack I’ll used credentials I save in some of the previous steps.

After that I I clicked Validate.

Validation passed

Accept terms and Next.

Now I see Install Confirmation modal:

Restore confirmation modal

It’s all good, I can proceed.

After a bit Duplicator restored entire content and I’ve a running site on a new domain.

Install WordPress on any Cloud. In under 5 minutes.
Supports Linode, Digital Ocean, Hetzner and Vultr.
Free Tier includes 1 server and 2 sites.
Sign up today