# How to Clone a WordPress Site to the Same or a Different Server in xCloud

> Duplicate a WordPress site in xCloud with Clone Site: copy files, database and settings to the same or another server, on a demo domain or your own.

To duplicate a WordPress site in xCloud, open the site, click **'Actions' → 'Clone Site'**, pick the destination server (the same server or another one in your team), choose a free demo domain or your own domain, then click **'Start'**. xCloud copies all files and the database, updates the site address, and can bring the source site's backup, security and email settings along.

See the [Clone a site feature page](/features/clone-wordpress-site/) for what it does, who it is for and which plans include it.

Cloning a WordPress site is useful when you want to:

- Build a new client site from a finished one instead of starting from scratch.
- Test a theme, plugin or PHP update on a copy, while the live site stays untouched.
- Move a site to a bigger or newer server, then switch the domain when you are ready.
- Keep a standalone copy on a different domain, for example a second brand or region.

## Before you start

Check these points first. Each one is enforced by the dashboard.

| Requirement | What it means |
|---|---|
| A paid plan | Clone Site is not available on the Free plan. Opening it on the Free plan sends you to **Billing** with the message "You need to upgrade your plan to access this feature." |
| A WordPress site | This guide covers WordPress. Laravel sites have their own guide: [How to Clone a Laravel App](/docs/how-to-clone-a-laravel-app-with-xcloud/). |
| The site is not busy | **'Clone Site'** is greyed out until the site is fully set up and working. It stays greyed out while the site is being created, updated or restored, and when its last action failed. |
| A destination server with room | The list shows provisioned servers in your team that can run PHP sites. A server whose disk is almost full (95% used, or less than 1 GB free) is left out. If no server qualifies, xCloud opens the **Create Server** page. |
| Permission to create sites | Team members need the right to add sites. Clients of a [white label](/docs/category/white-label/) portal do not see **'Clone Site'**. |

To copy every site on a server at once instead of one site, use [Clone Full Server](/docs/how-to-clone-full-server-with-xcloud/). To bring in a WordPress site hosted somewhere else, use [WordPress site migration](/docs/guide-to-wordpress-site-migration-on-xcloud/).

## Step 1: Open Clone Site

Open the site you want to copy. On its **Site Overview** page, click **'Actions'** at the top right, then click **'Clone Site'**. The clone wizard opens on the **Destination** step.

![Click 'Clone Site' in the site's Actions menu](/_landing/docs/clone-site-under-same-different-server-in-xcloud-image-1.png)

## Step 2: Choose the destination server

Open the server list and pick where the copy should live. The server the site runs on now is marked **(same server)**. Pick it to clone under the same server, or pick another server to clone to a different server. Click **'Next'**.

![Pick the destination server on the Destination step, the current server is marked 'same server'](/_landing/docs/clone-site-under-same-different-server-in-xcloud-image-2.png)

## Step 3: Choose a demo domain or a new domain

On the **Domains** step, pick one option and click **'Next'**:

- **'Demo Site'**: xCloud gives the copy a free temporary test domain. Use it to review the copy or share it with a client before it goes live. You can move it to your own domain later with [Go Live from a demo site](/docs/how-to-go-live-from-demo-site/).
- **'Migrate into a New Domain'**: type your own domain. Point that domain's DNS to the destination server so visitors reach the copy. See [How to create a demo site](/docs/create-a-demo-site-in-xcloud/) for how demo domains work.

![Click the 'Demo Site' card on the Domains step to clone onto a free test domain](/_landing/docs/clone-site-under-same-different-server-in-xcloud-image-3.png)

## Step 4: Set up the database

Under **Database Management**, choose how the copy stores its data, then click **'Next'**:

- **'Create Database In Server'**: xCloud fills in a new **Database Name**, **Database Username** and **Database Password**. Keep them or change them.
- **'Add Your Own Database'**: enter the details of a database you already have.

The source site's data is copied into this new database. The original database is not touched.

![Choose 'Create Database In Server' or 'Add Your Own Database' under Database Management](/_landing/docs/clone-site-under-same-different-server-in-xcloud-image-4.png)

## Step 5: Choose PHP and the settings to copy

On the **Settings** step:

1. Pick the **'PHP Version'**. It starts at the source site's version.
2. Check the **'Site User'**. xCloud suggests one; you can change it.
3. Optionally add a **'Deploy Script (Optional)'**, commands that run after the copy is made.
4. Tick **'Clone All Source Site Settings'** to copy everything listed, or tick only the groups you need.

Only the settings the source site actually uses are listed:

- **'Clone Backup Settings'**: **Remote Backup** and **Local Backup** schedules.
- **'Clone Security Settings'**: for example the built-in firewall (**8G Firewall** or **7G Firewall**), **Disable Nginx Config Regeneration**, **AI Bot Blocker**, **XML-RPC**, **X-Frame-Options**, **Custom Robots.txt**, **PHP Execution on Upload Directory**, [**BetterShield**](/docs/set-up-bettershield-login-protection-in-xcloud/), and **WP Fail2Ban** when the source still uses it.
- **'Clone Mail Delivery Settings'**: the source site's email sending setup.

Click **'Next'**.

![Pick the PHP Version and Site User, then tick 'Clone All Source Site Settings' or only the settings you need](/_landing/docs/clone-site-under-same-different-server-in-xcloud-image-5.png)

## Step 6: Review and start the clone

The **Confirm** step lists the new domain, the old domain, the server, HTTPS, PHP version, database and site user. Click **'Edit'** next to any line to go back and change it. When everything is right, click **'Start'**.

![Review the details on the Confirm step and click 'Start'](/_landing/docs/clone-site-under-same-different-server-in-xcloud-image-6.png)

xCloud now builds the copy on the destination server.

## What gets copied

| Copied | Not copied |
|---|---|
| All site files: WordPress core, themes, plugins and uploads | xCloud's built-in helper files (one-click login, cache purge, database and file manager tools) |
| The whole database, with the old address replaced by the new one | The source site's domain (the copy always gets a new one) |
| Your custom Nginx settings for the site | Settings you leave unticked on the Settings step |
| Backup, security and email settings you tick | |

Because the old address is replaced in the database, links, images and menus on the copy point to the copy, not to the original site.

## After cloning

- **Log in and check the copy.** Use **Magic Login** from the new site's page, then open a few pages, a form and the checkout if it is a shop.
- **Keep a test copy out of search results.** A copy on your own domain is public. If it is only for testing, turn on **Settings → Reading → Discourage search engines from indexing this site** in WordPress so it does not compete with the original.
- **Watch scheduled tasks and email.** A copy runs the same plugins, so newsletters, order emails or sync jobs can also run from it. Pause what should only run on the live site.
- **Go live when ready.** Moving a demo copy to your own domain is covered in [Go Live from a demo site](/docs/how-to-go-live-from-demo-site/). To change the domain of any site later, see [Change the primary domain](/docs/how-to-change-the-primary-domain-of-a-site/).

## If the clone fails

Check that the destination server still has free disk space and that the database details you entered are valid. If the clone still does not finish, contact our support team with the source site and the new domain you chose.

## Clone Site, staging or a full server clone?

| You want to | Use |
|---|---|
| A separate, lasting copy of one site, on the same or another server | Clone Site (this guide) |
| Test changes and push them back to the live site | [Staging environment](/docs/how-to-create-a-staging-environment-in-xcloud/) |
| Copy every site on a server to another server | [Clone Full Server](/docs/how-to-clone-full-server-with-xcloud/) |

## Frequently asked questions

### What does Clone Site copy?

It copies all of the site's files and its database to the new site, then replaces the old address with the new one so links and images point to the copy. You choose which backup, security and email settings come along on the Settings step.

### Will cloning change or slow down my original site?

No. The source site keeps running and nothing in it is changed. xCloud reads its files and database and writes everything into a separate new site.

### Can I clone a site on the Free plan?

No. Clone Site is available on paid plans. On the Free plan, xCloud sends you to Billing to upgrade when you open it.

### Is Clone Site the same as a staging site?

No. A clone is a separate, independent site. A staging site stays linked to its live site so you can push and pull changes between the two. Use staging to test changes you plan to send back to the live site, and Clone Site when you want a lasting copy.

If you run into any issues while cloning a site, feel free to reach out to our [support team](/docs/access-built-in-support-portal-in-xcloud/).
