---
title: "Create an environment"
url: https://docs.corefinity.com/guides/sites/environments-and-copies/create-an-environment
type: guide
last_updated: 2026-11-13
feature: environments
related:
  - https://docs.corefinity.com/api/reference/environments/update-site-environment.md
  - https://docs.corefinity.com/api/reference/environments/list-site-environments.md
  - https://docs.corefinity.com/api/reference/environments/create-site-environment.md
  - https://docs.corefinity.com/api/reference/environments/get-environment-starts-with.md
  - https://docs.corefinity.com/api/reference/environments/list-staging-sizes.md
  - https://docs.corefinity.com/mcp/tools/corestack_environment_list.md
  - https://docs.corefinity.com/mcp/tools/corestack_environment_create.md
  - https://docs.corefinity.com/mcp/tools/corestack_environment_update.md
  - https://docs.corefinity.com/mcp/tools/corestack_environment_resize.md
  - https://docs.corefinity.com/mcp/tools/corestack_environment_delete.md
  - https://docs.corefinity.com/mcp/tools/corestack_uat_sizes_list.md
---
# Create an environment

Add a staging environment to a site, empty or as a copy, then rename or delete it when the work is done.

## Before you start

- You can open the site in **Managed Websites**. Anyone who can open a site can create, rename and delete its environments.
- Every environment you add is a staging environment with its own files, database, hostname and SSH port. On a CoreCluster it uses the cluster's capacity; on a CoreStack site the dialog shows its price before you create it.
- Staging starts password-protected and hidden from search engines, with scheduled tasks and scheduled backups off and outgoing email held.

## Create the environment

1. **Open Environments**

   Go to **Managed Websites**, choose the site, then **Environments** under **Code & backups**. Choose **Create environment**.

   _Screenshot: A site page with Environments ringed in the menu and the Create environment button ringed. The list shows Production and Staging with their hostnames, size, deploy mode and backups._

2. **Name it and choose a size**

   Enter a **Name** of up to 40 characters, then choose a **Size**; it starts on Production's. The **Slug** below the name becomes part of the hostname and cannot be changed later: choose **Edit** to set it yourself.

   _Screenshot: The Create a staging environment dialog with the name Redesign, the slug redesign with Edit beside it, the sizes Small, Medium and Large with Small marked same as Production, and Start from set to Empty._

3. **Choose what it starts from**

   Under **Start from**, choose what the environment begins with.

   - **Empty**: the runtime, a database and SFTP, with nothing copied and no application installed.
   - **A copy of…**: an environment of this site, copied once. Choose **Files and database**, **Database only** or **Files only**.
   - **A git branch**: a copy of the data with a branch deployed on top: see [Staging from a branch](/guides/sites/environments-and-copies/staging-from-a-branch).

   _Screenshot: The Create a staging environment dialog with the name Redesign, the sizes S, M and L, and Start from set to A copy of…, with Production as the source and Files and database chosen._

4. **Create it**

   Choose **Create environment**. **Environments** shows the progress, and the environment joins the list when it is ready.

5. **Copy the login**

   A dialog shows the login for the environment's password protection, and on WordPress a new admin password. They are shown once: copy them, then choose **Done**.

To work on the new environment, choose it in the site header where it reads **Production**.

## Rename or delete an environment

1. **Open the environment's menu**

   In **Environments**, open the environment's **…** menu.

   _Screenshot: The Environments list with the menu open on Staging, Rename… and Delete… among its actions._

2. **Rename it, or delete it**

   **Rename…** changes the name shown in the Control Panel; the hostname stays. To delete, choose **Delete…**, type the environment's name, then choose **Delete** and the name.

   _Screenshot: The Delete Staging dialog: what is removed, how long its final backup is kept, a box to type Staging to confirm, and the buttons Cancel and Delete Staging._

   > **Warning:** Deleting removes the environment's files, database, hostname and SSH port at once. The dialog says how long its final backup is kept and how to have it restored.

Production cannot be deleted here: see [Delete a site](/guides/sites/create-and-manage/delete-a-site).

## Automate this

**API:** [Create a staging environment](https://docs.corefinity.com/api/reference/environments/create-site-environment.md), scope `write`

```bash
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/environments \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Review",
    "slug": "review",
    "source": {
      "environment_id": 1043,
      "scope": "files_db",
      "type": "clone"
    }
  }'
```

**MCP:** [`corestack_environment_create`](https://docs.corefinity.com/mcp/tools/corestack_environment_create.md), scope `write`

```json
{
  "name": "corestack_environment_create",
  "arguments": {
    "site_id": 4211,
    "name": "Staging",
    "source": {
      "type": "empty"
    }
  }
}
```

**Control Panel:** Managed Websites › your site › Code & backups › Environments ([https://manage.corefinity.com/go/environments](https://manage.corefinity.com/go/environments))

## Related

&#xA;- [Password protection](/guides/sites/access-and-security/password-protection): Put a login in front of an environment.
- [Add a domain](/guides/sites/go-live/add-a-domain): Attach a domain to a site.
