---
title: "How to Create a Test Copy of Your Website on Plesk"
description: "Create a test copy of your website on a subdomain with Plesk Website Copying, duplicate the database and protect the copy before your changes."
category: cloud
subcategory: hebergement-web
icon: tabler:file-text
date: 2026-11-02
author: Winheberg
slug: "test-copy-website-plesk"
order: 157
image: /statics/images/docs/en/hebergement-web/test-copy-website-plesk.webp
tags: [Plesk, Staging, Copy, Subdomain, Web Hosting]
keywords: [website copy, plesk staging, test website, website copying, staging, clone a website]
link_fr: "/docs/hebergement-web/copie-test-site-plesk"
---

## Context

Switching theme, updating a major extension or redesigning a page directly on the live website means taking the risk that your visitors land on a broken website. The right method is to work on a test copy, also called staging, then to carry the changes over once they are approved.

Your [Winheberg web hosting](https://winheberg.com/en/cloud/web-hosting) lets you create this copy on a subdomain, for instance `test.example.com`, with the Plesk **Copie du site Web** (*Website Copying*) tool.

This guide covers creating the subdomain, copying the files, copying the database, setting up the copy and protecting it.

> [!NOTE]
> The Winheberg Plesk panel is displayed in French. Menu, field and button names are quoted below exactly as they appear on screen, followed by their English meaning.

> [!TIP]
> For a WordPress website, WP Toolkit does all of this in one click, database included. Follow our guide [How to Manage Your WordPress Website with WP Toolkit on Plesk](https://winheberg.com/en/docs/hebergement-web/manage-wordpress-wp-toolkit-plesk) instead.

## Prerequisites

- A Winheberg web hosting plan with access to the Plesk panel
- A plan that allows at least one more subdomain
- The name of the configuration file of your website, the one that holds the database access

## 1. Create the test subdomain

In **Sites Web & Domaines** (*Websites & Domains*), click **Ajouter un sous-domaine** (*Add Subdomain*). Enter `test` in **Nom du sous-domaine** (*Subdomain name*), choose your domain on the right, then keep the suggested **Racine du document** (*Document root*). Confirm with **OK**.

<img src="/statics/images/docs/en/hebergement-web/test-copy-website-plesk-1793621338620-d485cbdfbb567e747162aad7.webp" alt="Add Subdomain form in Plesk" width="790" />

## 2. Copy the website files

Open the **Tableau de bord** (*Dashboard*) of your main website. In the **Fichiers et bases de données** (*Files & Databases*) section, click **Copie du site Web** (*Website Copying*).

In **Destination de la copie** (*Copy destination*), keep **Site Web dans Plesk** (*Website in Plesk*), choose your test subdomain in **Nom du site** (*Site name*), then tick **Supprimer tous les fichiers existants** (*Delete all existing files*), which empties the subdomain before the copy. Click **OK**.

<img src="/statics/images/docs/en/hebergement-web/test-copy-website-plesk-1793621339048-0c8ae86aa59d8bcb6b38794d.webp" alt="Website Copying form to a subdomain in Plesk" width="795" />

> [!WARNING]
> Check the **Nom du site** twice before confirming. With **Supprimer tous les fichiers existants**, the chosen website is emptied before it receives the copy.

## 3. Copy the database

**Copie du site Web** only copies files. If your website uses a database, it must be duplicated separately.

- Open **Bases de données** (*Databases*) and click **Ajouter une base de données** (*Add Database*) to create the database of the copy, linked to the test subdomain
- Export the database of the live website, then import that file into the new database

Both operations are detailed in our guide [How to Manage Your Database with phpMyAdmin on Plesk](https://winheberg.com/en/docs/hebergement-web/manage-database-phpmyadmin-plesk)

## 4. Link the copy to its own database

In the test subdomain, open the configuration file with the **Fichiers** (*Files*) manager and replace the database access with that of the new database. Also update the website address when the file holds one.

::MdTable{caption="Configuration file by website" variant="info" striped}
| Website | File | Values to change |
|---|---|---|
| Joomla | `configuration.php` | `$db`, `$user`, `$password`, and `$live_site` if it is filled in |
| Laravel | `.env` | `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `APP_URL` |
| Azuriom | `.env` | `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`, `APP_URL` |
| Custom PHP website | Depends on your code | Database name, user, password |
::

> [!CAUTION]
> Until this file is changed, the copy writes to the database of the live website. An order or an account created during your tests would then show up for your real visitors.

## 5. Protect the copy

Your test copy must be seen neither by your visitors nor by search engines. Protect the whole subdomain with a password by following our guide [How to Password Protect a Folder of Your Website on Plesk](https://winheberg.com/en/docs/hebergement-web/password-protect-folder-plesk)

## 6. Carry the changes over to the live website

Once your changes are approved on the copy, there are two approaches.

- Redo the same settings on the live website, the safest method when changes are made from the website administration
- Copy the changed files back to the live website, with **Copie du site Web** started this time from the **Tableau de bord** of the test subdomain and the **Garder les fichiers existants sur le site cible** (*Keep existing files on the target site*) option, which only overwrites files with the same name

> [!WARNING]
> Do not copy the database of the copy back to the live website. It would overwrite everything that happened on the website during your tests, such as new accounts, comments or orders.

Back up the live website before carrying anything over, with our guide [How to Back Up and Restore Your Website on Plesk](https://winheberg.com/en/docs/hebergement-web/backup-restore-website-plesk)

## Troubleshooting

### ❌ The copy shows a database connection error

The access in the configuration file does not match the new database.

- Check the database name, user and password in the configuration file
- Check in **Bases de données** that the user does have access to the new database

### ❌ The copy sends you to the live website

The website address saved in the configuration or in the database is still that of the live website.

- Update the address in the configuration file, as in step 4
- Clear the cache of your CMS and of the browser

### ❌ The subdomain still shows the Plesk default page

The copy did not target the right website, or it is still running.

- Open the **Fichiers** manager of the subdomain and check that your files are there
- Run **Copie du site Web** again, checking the **Nom du site**

## Best practices

- Make a fresh copy before each large piece of work, an old copy no longer looks like the live website
- Keep the copy password protected at all times
- Write down each change made on the copy, to carry it over without forgetting anything
- Delete the copy and its database when you no longer need them, they use your disk space

## Need help?

If the copy of your website does not work, open a ticket with our support from your [client area](https://billing.winheberg.com), **Technical** department, filling in the **Related Product** field with the web hosting concerned. Give the original website, the test subdomain and the message shown.

Your sandbox is ready, test without fear 🧪

