Modulify

Duplicate a site

duplicate_site

Copies an existing site into a workspace as a new, independent site with its own subdomain and URL.

Scopesites:createMakes changes

The copy takes every table and row of the site database with it, on either database engine. You need access to both the workspace of the site and the one it is copied into.

It creates real infrastructure and counts against the site limit of the target workspace, so a workspace with no site slot left refuses it with site-limit-reached and the current count and limit.

A site on the newer database is refused while its database has a full text search table, is larger than 25 MB, is being backed up, or is already being copied, and the refusal names the reason. A refused copy leaves nothing behind, and a busy database can be retried a few minutes later.

On the newer database, copying the rows pauses the original database for a moment, as a database backup does. Copying a database has the messages.

Inputs

Input Type Required Description
projectId string Yes The site to copy.
workspaceId string Yes The workspace to copy it into, which can be the site's own.