EN

Web hosting

Create a test copy of your site

Create a test copy of your site on Plesk, with WP Toolkit for WordPress or manually for other sites, then publish your changes safely.

6 min read, updated on 18 November 2026

On this page

Your values

Enter them once and the commands in this guide update.

A test copy lets you try an update, a plugin or a redesign without touching the site your visitors see. On Plesk, it is generally placed on a subdomain, such as test.your-domain.com.

There are two methods:

  • WordPress site: cloning with WP Toolkit copies the files and the database, then adapts the address.
  • Other site: you copy the files and the database, then adapt the configuration by hand.

Prerequisites

Some plans include only one site and one database: check yours on the hosting plans page.

Method 1: clone a WordPress site

  1. Open the WordPress menu in Plesk.
  2. On the site card, click Clone.
  3. Keep Create subdomain. The suggested prefix is staging, and you can change it.
  4. If needed, change the name of the database created for the copy.
  5. Click Start.

The clone then appears in the list of the WordPress menu.

On the clone's card, then check that Search engine indexing is turned off, and turn on Password Protection.

Publish the tested changes

  1. On the clone card, click Copy Data.
  2. In Target, select the production site.
  3. In Data to Copy, choose what must be transferred.
  4. Keep Create a restore point selected.
  5. Click Start.
Choice Effect
Files Only Copies WordPress, themes and plugins, without the database
Database Only Copies only the selected tables
Files and Database Copies both

The target site goes into maintenance during the operation. Clear the source's cache before you start if it uses a caching plugin. If the source's WordPress version is older than the target's, the copy is canceled.

A restore point does not replace a backup. Also back up production before the copy.

Method 2: copy another site

Step 1: create the subdomain

  1. Go to Websites & Domains, then click Add Subdomain.
  2. In Subdomain name, enter test, for example.
  3. In Document root, specify a folder specific to the subdomain, for example test, and not the httpdocs folder of the main site.
  4. Click OK.

If your DNS is managed outside Plesk, also create a record for test.your-domain.com, see Connect a domain registered elsewhere.

Step 2: protect the copy

Before copying the files, protect the subdomain with / by following Password-protect a folder. This way, the copy will be neither visible to the public nor indexed.

Step 3: copy the files

  1. In Websites & Domains, locate the site to copy and click Website Copying.
  2. Select Website in Plesk.
  3. In Site name, choose test.your-domain.com.
  4. Specify how to handle the files already in the destination.
  5. Click OK.

This feature copies only the files in the site root. Files located elsewhere, such as those of some frameworks, must be copied separately.

Step 4: copy the database

  1. Go to Websites & Domains > Databases.
  2. Click Copy next to the site's database.
  3. Keep the same server in Destination database server.
  4. In Destination database, create a new database, for example site_test.
  5. Leave Create a full copy selected.
  6. Click OK.

Do not use the production database as the destination: tables with the same name would be replaced. Then create a user dedicated to the new database, see Create a database.

Step 5: adapt the configuration

In the files of the copy, and definitely not in those of the main site:

  1. Replace the database name, user and password with those of the copy.
  2. Replace the site address with https://test.your-domain.com.
  3. Turn off real sends: emails to customers, payments, scheduled tasks and webhooks.

Plesk does not update these values for you. They may also be stored in the database.

Publish the changes

The safest method is to carry your changes over to the production site after a backup. This way, you avoid overwriting recent data.

Plesk also lets you point the main domain's Document root to the copy's folder, in its hosting settings. Write down the old value so you can go back, and restore the configuration to its production values beforehand. Also remove the password protection.

Check the copy

  1. Open https://test.your-domain.com in private browsing. A password must be requested.
  2. Check that links and login stay on test.your-domain.com.
  3. Edit some test content, then check that it does not appear on the main site.
  4. Check the server's response:
Terminal
curl -I https://test.your-domain.com/

You should get 401 as long as the protection is active.

Troubleshooting

Symptom Likely cause Solution
The copy redirects to the main site The saved address is still the old one On WordPress, use Update Site URL. Otherwise, fix the configuration and the database
The copy changes the main site's data Its configuration still targets the production database Fix the connection immediately, then check the production data
Error establishing a database connection Incorrect credentials or database name Compare wp-config.php or your configuration file with the copied database
The subdomain does not respond DNS record missing or not yet propagated Check it with dig +short test.your-domain.com
Certificate warning The certificate does not cover the subdomain Issue a certificate for this subdomain
Creation is impossible Limit of sites, subdomains, databases or disk space reached Free up resources or change plans
Cloning hangs or fails Large site, problematic plugin or server limit Clear the caches, remove old backups, then contact support if needed
Copy Data is canceled The source has an older WordPress version than the target Update the source first