Skip to content

Clone a site

POST /v1/sites/{siteId}/clone

Copies the site (every file and its whole database) into a new site of its own, on the same server or another server of the account. The new site has the original's WordPress users, and keeps its own built-in address. The site you clone isn't changed. By default its PHP and resource settings, its firewall and its cron jobs (paused) are copied too (options).

What happens next. The answer is 201 with the new site and the clone (queued), and the new site's address in Location. The new site is installed first, then the copy is made into it, usually in a few minutes. Poll GET /sites/{siteId}/clone/status with the new site's id every 10 seconds until status is done, failed (the reason in lastError) or cancelled.

Limits. One clone of a site at a time. Not for staging copies, or sites still installing or busy; the destination server must be running, and the token must reach both servers. It counts as one of the hour's new sites (see Rate limits). Cloning a site that has Media Offload counts as setting Media Offload up (the clone gets it too if the site keeps some of its media only in storage when the copy is done): 200 a day per account (429 rate_limited; a day ends at 00:00 UTC).

Idempotency-Key required. A request sent again (after a timeout, say) must never make a second site or start a second copy: each needs an Idempotency-Key (400 idempotency_key_required without one), the same request sent again with the same key gets the first answer, and nothing is made twice; while the first is still running, the same key answers 409 idempotency_in_progress (try again in a moment).

Media Offload. When the site being copied has Media Offload on (on, being set up, being turned off, or failed), the new site gets it too, billed by use after each month like turning it on (POST /sites/{siteId}/media-offload/actions/enable): so this also needs billing:write (403 insufficient_scope without it; billing:write is for tokens for all servers only, so a token limited to some servers is refused with 403 all_servers_required) and the account's agreement to card charges, given once in the panel's Billing (403 charges_not_authorized). Nothing is made or changed then.

Scopes

The token needs these scopes. Without them, the request is refused with insufficient_scope (see Scopes).

sites:create
Create sites. Install new WordPress sites on your servers. Cloning a site also needs Manage sites.
sites:write
Manage sites. Domains, SSL, CDN, cache, firewall, malware protection, resources, backups, staging, Media Offload, SMTP and RabbitPress Cache. Choosing Rabbitflare Backup for a site's backups, and turning on Media Offload or a site's malware protection, also need Turn on paid features: they start monthly charges.

Headers

FieldType and description
Idempotency-Key Required

string 1 to 255 characters

A key of your own for this request, like a UUID: letters, digits and _ - : . Send the request again with the same key (after a timeout, say) and it's done only once. Keys are kept for 24 hours (see Idempotency).

Path parameters

FieldType and description
siteId Required

string

The id of the site to clone.

Request body

JSON, with these fields. Fields that aren't listed are refused.

FieldType and description
name Required

string 2 to 48 characters

The site's name: 2 to 48 letters, numbers, spaces, dots, dashes or underscores, starting with a letter or number.

serverId Required

string

The server to clone the site to: the site's own, or another server of the account (destinations in GET /sites/{siteId}/clone).

options

object

What to copy besides the files and the database. Left out: the defaults.

resources

boolean

Copy the site's PHP and resource settings, where they fit the destination server. Default true.

firewall

boolean

Copy the firewall's settings, addresses and exceptions. Default true.

cron

boolean

Copy the site's cron jobs, paused. Default true.

noindex

boolean

Ask search engines not to index the clone. Default false.

Example request

# Keep this key when you send the same request again (after a timeout, say), so it's only done once.
KEY=$(uuidgen)
curl -X POST "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/clone" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $KEY" \
  -d '{
  "name": "Shop copy",
  "serverId": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
  "options": {
    "noindex": true
  }
}'

Response

201 Created Returns the CloneStarted object in data.

The CloneStarted object's fields 95 fields
FieldType and description
site

object

A WordPress site on one of your servers.

id

string

The site's id.

name

string

The site's name, as shown in the panel.

serverId

string

The id of the server the site is on.

server

object

The server the site is on, at a glance.

Show its 7 fields
FieldType and description
id

string

The server's id.

name

string

The server's name.

status

string

The server's status (see the Server object).

Known values: pending_paymentprovisioningactiveoffsuspendedfaileddeletingdeleted More can appear.

cloud

string

Where the server runs (see the Server object).

Known values: digitaloceanvultrhetznerlinodegcpedgecustom More can appear.

region

string

The server's location id.

ipv4

string or null

The server's public IPv4 address. Null until it has one.

ipv6

string or null

The server's public IPv6 address. Null when it has none.

status

string

queued: waiting for its server. installing: WordPress is being installed (see stage). active: live. failed: the install failed (see lastError). deleting: being deleted. deleted: deleted.

Known values: queuedinstallingactivefaileddeletingdeleted More can appear.

stage

string

How far the install has got: queued, wordpress (installing WordPress), ssl (issuing its certificate), then complete, or failed.

Known values: queuedwordpresssslcompletefailed More can appear.

pendingAction

string or null

A change in progress on the site: domain (updating its domains), ssl (issuing a certificate), delete or restore (restoring a backup). Another change waits until it's done (409 busy). Null when there's none.

Known values: domainssldeleterestore More can appear.

url

string

The site's address, on its primary domain (https once its certificate is active).

adminUrl

string

The address of the site's WordPress dashboard.

builtInDomain

string

The address every site gets, which keeps working whatever domains it has.

primaryDomain

string

The domain the site is served on; other domains redirect to it.

siteTitle

string

The site's title in WordPress, as set when it was created.

wordpress

object

The WordPress administrator made with the site. The password is read with GET /sites/{siteId}/wordpress-login.

Show its 2 fields
FieldType and description
adminUsername

string

The WordPress administrator's username.

adminEmail

string

The WordPress administrator's email address.

sslStatus

string

The site's SSL certificate: none, pending (being issued), active or failed.

Known values: nonependingactivefailed More can appear.

cdn

string

The included CDN for the site's static files: off, enabling, active or failed.

Known values: offenablingactivefailed More can appear.

firewall

object

The site's web application firewall.

Show its 2 fields
FieldType and description
mode

string

off, monitor (logs attacks, blocks nothing) or protect (blocks attacks).

Known values: offmonitorprotect More can appear.

status

string

Whether its settings are in place on the server: off, installing, applying, active or failed.

Known values: offinstallingapplyingactivefailed More can appear.

malwareProtection

object

The site's malware protection (Imunify360). GET /sites/{siteId}/malware-protection has the rest.

Show its 2 fields
FieldType and description
enabled

boolean

Whether malware protection (Imunify360's scanning and cleaning) is on for the site.

included

boolean

Whether the site is its server's included one, at no charge: the first with it on. Each other site with it on is billed.

customResources

boolean

Whether the site has resource settings of its own (limits, priority or PHP settings) rather than the server's defaults.

stagingOf

object or null

When this site is a staging copy: the live site it copies. Null otherwise.

Show its 2 fields
FieldType and description
id

string

The live site's id.

name

string

The live site's name.

staging

object or null

A live site's staging: its copy and the staging operation running now. Null when it never used staging.

Show its 4 fields
FieldType and description
id

string or null

The staging copy's id. Null when it has none now (only restore points, or an operation).

status

string or null

The staging copy's status (as a site's). Null when it has none.

Known values: queuedinstallingactivefaileddeletingdeleted More can appear.

busy

string or null

The staging operation running now: create, refresh, push or undo. Null when none is.

Known values: createrefreshpushundo More can appear.

attention

boolean

Whether the running staging operation is waiting for our team.

clone

object or null

When this site is a clone being made (or whose copy failed): the clone. Null once the copy is in, or when it never was a clone.

Show its 6 fields
FieldType and description
id

string

The clone's id.

status

string

queued, copying, finishing, done, failed or cancelled.

Known values: queuedcopyingfinishingdonefailedcancelled More can appear.

stage

string or null

What's happening now, in words. Null when not known.

progress

number or null

0 to 100 while copying. Null when not known.

sourceName

string

The name of the site being copied.

error

string or null

Why the copy failed. Null otherwise.

clonedFrom

object or null

The site this one was cloned from, and when. Null when it wasn't cloned.

Show its 3 fields
FieldType and description
id

string or null

The original site's id. Null once that site is deleted.

name

string

The original site's name.

clonedAt

string An ISO 8601 time, in UTC

When the clone was made.

beingCloned

object or null

A clone of this site being made right now: the new site. Null otherwise.

Show its 2 fields
FieldType and description
id

string

The new site's id.

name

string

The new site's name.

iconUrl

string or null

The site's own icon (WordPress's Site Icon), looked up once a day. Null when it has none.

lastError

string or null

Why the install or the last change failed. Null when nothing failed.

readyAt

string or null An ISO 8601 time, in UTC

When the site finished installing. Null until then.

createdAt

string An ISO 8601 time, in UTC

When the site was created.

updatedAt

string An ISO 8601 time, in UTC

When the site last changed.

clone

object

A clone: a copy of a site, with every file and its whole database, made into a new site of its own.

id

string

The clone's id.

status

string

queued: the new site is being installed. copying: the copy is being made (from another server, the site is packed there first). finishing: the clone's settings are being applied (it can't be cancelled now). Then done, failed (see lastError; try again with POST /sites/{siteId}/clone/actions/retry on the new site) or cancelled (the new site is deleted).

Known values: queuedcopyingfinishingdonefailedcancelled More can appear.

stage

string or null

What's happening now, in words. Null once it's finished.

progress

integer or null

How far the copy has got, 0 to 100. Null when that isn't known.

source

object or null

The site that is copied. A clone never changes it. Null when this token can't reach that site's server (a token limited to some servers).

Show its 3 fields
FieldType and description
id

string

The site's id.

name

string

The site's name.

serverName

string

The name of the site's server.

target

object

The new site the copy is made into.

Show its 3 fields
FieldType and description
id

string

The site's id.

name

string

The site's name.

serverName

string

The name of the site's server.

crossServer

boolean

Whether the new site is on another server than the original.

options

object

What the clone copies besides the files and the database.

Show its 4 fields
FieldType and description
resources

boolean

The site's PHP and resource settings were copied, where they fit the destination server.

firewall

boolean

The firewall's mode, sensitivity, login protection, blocked and allowed addresses and exceptions were copied.

cron

boolean

The site's cron jobs were copied, paused (the original keeps running its own).

noindex

boolean

Search engines are asked not to index the clone (WordPress's “Discourage search engines” setting).

lastError

string or null

Why the clone failed (or was cancelled by itself). Null otherwise.

notes

array of strings

What's worth knowing after the clone: settings that didn't fit the destination, cron jobs copied paused, and the like.

health

object or null

The new site's own pages, checked right after the copy. Null until they're checked.

Show its 3 fields
FieldType and description
ok

boolean

Whether the new site's pages answered as the original's did.

problems

array of strings

What went wrong, page by page.

reason

string or null

Why the pages failed, where the server could tell. Null otherwise.

skipped

array of objects

Files the copy left out (up to 100 of them).

Show its 2 fields
FieldType and description
path

string

The file's path in the site.

reason

string

Why it was left out: unreadable, unreadable_folder, link_outside_site (a link pointing outside the site), changed_while_copying, database_password (it holds the original's database password), special_file (not a regular file) or other.

Known values: unreadableunreadable_folderlink_outside_sitechanged_while_copyingdatabase_passwordspecial_fileother More can appear.

skippedCount

integer

How many files the copy left out in all.

sizes

object or null

What was copied. Null until the copy is made.

Show its 2 fields
FieldType and description
filesBytes

integer

The site's files, without caches and backup archives, in bytes.

databaseBytes

integer

The site's database, in bytes.

cancellable

boolean

Whether it can be cancelled now (POST /sites/{siteId}/clone/actions/cancel on the new site): until it's switched into the new site.

createdAt

string An ISO 8601 time, in UTC

When the clone was started.

startedAt

string or null An ISO 8601 time, in UTC

When the copy started. Null until then.

finishedAt

string or null An ISO 8601 time, in UTC

When it finished. Null until then.

Example response

201 Created
{
  "data": {
    "site": {
      "id": "6d3f2e1c-9b8a-4c7d-8e6f-5a4b3c2d1e0f",
      "name": "Shop copy",
      "serverId": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
      "server": {
        "id": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
        "name": "Production",
        "status": "active",
        "cloud": "digitalocean",
        "region": "fra1",
        "ipv4": "203.0.113.10",
        "ipv6": "2001:db8::10"
      },
      "status": "queued",
      "stage": "queued",
      "pendingAction": null,
      "url": "http://shop-copy-p4m8r.rabbitflare.link",
      "adminUrl": "http://shop-copy-p4m8r.rabbitflare.link/wp-admin/",
      "builtInDomain": "shop-copy-p4m8r.rabbitflare.link",
      "primaryDomain": "shop-copy-p4m8r.rabbitflare.link",
      "siteTitle": "Example Shop",
      "wordpress": {
        "adminUsername": "editor",
        "adminEmail": "[email protected]"
      },
      "sslStatus": "none",
      "cdn": "off",
      "firewall": {
        "mode": "off",
        "status": "off"
      },
      "malwareProtection": {
        "enabled": true,
        "included": true
      },
      "customResources": false,
      "stagingOf": null,
      "staging": null,
      "clone": {
        "id": "2b7e1c9d-3a4f-4e5b-8d6c-0f1e2a3b4c5d",
        "status": "queued",
        "stage": "Setting up the new site",
        "progress": null,
        "sourceName": "Shop",
        "error": null
      },
      "clonedFrom": null,
      "beingCloned": null,
      "iconUrl": null,
      "lastError": null,
      "readyAt": null,
      "createdAt": "2026-11-18T15:40:12.000Z",
      "updatedAt": "2026-11-18T15:40:12.000Z"
    },
    "clone": {
      "id": "2b7e1c9d-3a4f-4e5b-8d6c-0f1e2a3b4c5d",
      "status": "queued",
      "stage": "Setting up the new site",
      "progress": null,
      "source": {
        "id": "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
        "name": "Shop",
        "serverName": "Production"
      },
      "target": {
        "id": "6d3f2e1c-9b8a-4c7d-8e6f-5a4b3c2d1e0f",
        "name": "Shop copy",
        "serverName": "Production"
      },
      "crossServer": false,
      "options": {
        "resources": true,
        "firewall": true,
        "cron": true,
        "noindex": true
      },
      "lastError": null,
      "notes": [],
      "health": null,
      "skipped": [],
      "skippedCount": 0,
      "sizes": null,
      "cancellable": true,
      "createdAt": "2026-11-18T15:40:12.000Z",
      "startedAt": null,
      "finishedAt": null
    }
  }
}

Errors

The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).

Status and codeWhen, and what to do
400 idempotency_key_required

This operation needs an Idempotency-Key header: it spends money, or doing it twice isn't the same as doing it once.

Send a unique Idempotency-Key (a UUID) with the request.

403 feature_unavailable

This product isn't open to the account.

Contact support if you'd like it opened.

403 insufficient_scope

The token lacks a scope this operation needs (missingScopes).

Edit the token in the panel and add the scopes in missingScopes.

403 all_servers_required

The token is limited to some servers, and this operation needs a token for all servers: it changes domains or Cloudflare, or reaches Mail or billing, none of which is tied to one server.

Use a token for all servers: make one in the panel with All servers.

403 charges_not_authorized

The account hasn't agreed to card charges yet.

In the panel, open Billing and accept the terms once. Then try again.

403 trial_locked

The site's server is on the free trial: WordPress sign-in, the File Manager and Cron Jobs switch on once it's kept.

Keep the server in the control panel: they switch on by themselves.

404 not_found

The resource doesn't exist, or isn't this account's.

Check the id. Ids of other accounts' resources answer the same way.

409 cannot_clone

The site can't be cloned right now. message says why (a staging copy, still installing, its server off, another operation running…).

Deal with what message says, then try again. blockers in GET /v1/sites/{siteId}/clone lists everything in the way.

409 server_unavailable

The server isn't in a state that allows this (for example, it's off or still being set up).

Start the server, or wait until it's active, then try again.

409 media_in_storage

The site keeps some of its media only in Media Offload's storage, which a server of your own doesn't have.

Clone it to one of your Rabbitflare cloud servers, or bring its media back to its server first.

409 clone_busy

A clone of this site, or of a site on this server, is being made.

Wait until the clone finishes (or cancel it), then try again.

409 server_restoring

The server is being restored, and nothing else can change it or its sites until that's done.

Wait until the restore finishes (the server's pendingAction is null again), then try again. A restore that stopped partway keeps pendingAction: "restore", with the server's lastError set, until our team has checked the server.

422 validation_failed

One or more fields are missing or wrong. fields names each one with what's wrong.

Correct the fields named in fields. Unknown fields are refused too.

429 rate_limited

Too many requests. scope says which limit: token, account, create, operation or network.

Wait for Retry-After seconds, then go on more slowly.

Rate limit

Write requests: 30 a minute per token, 60 per account. New sites: 60 an hour per account. More in Rate limits.

Added on .

Popular

API docs