In this guide, we’ll walk you through cloning your production website to a separate server, specifically, a virtual machine (VM) hosted on DigitalOcean, using the powerful and user-friendly WP Staging plugin. We’ll cover how to quickly acquire and set up a DigitalOcean instance, install and configure WordPress, and migrate all data from your production site to the new server. Best of all, you can achieve this for as little as $5/month. This article can be an essential guide to setting up a staging site on an external DigitalOcean server or for other hosting providers. The steps then may vary a little, though.
Contents
Set Up the Staging Site on an External Server
If you don’t have a new server with WordPress installed, we recommend creating a new droplet on DigitalOcean for that purpose.
Got to DigitalOcean and sign up by using one of the options:
Go to the 1-Click App Marketplace and click on the “Create WordPress Droplet” button:
Choose the “Region” and “Datacenter” for your droplet as you want, and make sure WordPress is the image for your droplet, as in this screenshot:
Select your preferred droplet size, CPU, and RAM. In the “Choose Authentication Method” section, if you’re unfamiliar with SSH keys, choose ‘Password’ to connect securely.
After creating the droplet, copy its IP address as shown in this screenshot:
Then open your terminal and run:
ssh root@<your-droplet-ip>
and continue the droplet setup script. Check this guide for more details.
You can now log into your new WordPress site using the credentials you set during the setup script above.
Once you are inside the WordPress Dashboard of the staging site, install the WP STAGING PRO plugin by following this guide.
Create the Backup of the Current Live Site
Create a full site backup of your live site. You can also upload it to Google Drive or another cloud service. This makes downloading the backup to the staging site more straightforward, but this step is not mandatory.
Upload the Backup on the Staging Site
Log into the staging site again, and download the live site’s backup file either from the remote storage option if you uploaded it to a cloud provider like Google Drive or use the option to copy it from a URL:
Then either choose to Download it or Restore it directly:
Or click on the “Upload Backup” button and follow any of these methods to upload the backup file:
Restore the Backup to Your Staging Site on an External Server
Now, you can restore the backup file on the blank WordPress site you have on the new server:
Backup Your Staging Site on an External Server and Restore it on the Live Site.
If you want to restore a backup that you have created from a staging site on a live site, you can follow the same method to make a backup of the staging site, upload it to Google Drive, and retrieve and restore it on the live site very quickly.
Bonus Tip: Use the SFTP cloud storage to quickly move the backup file between the Live and Staging sites.
If you prefer not to use Google Drive, consider this helpful tip:
- On the live site, add the SFTP information of the staging site (so the backup file is uploaded there).
- On the staging site, add the SFTP information of the live site (so the backup file is uploaded there).
Here’s the guide explaining how you can back up your site and get it uploaded via SFTP.