---
title: "Deploy, stop, retry and roll back"
url: https://docs.corefinity.com/guides/sites/code-and-deployments/deploy-stop-retry-roll-back
type: guide
last_updated: 2026-11-13
feature: deployments
related:
  - https://docs.corefinity.com/api/reference/deployments/get-site-deployments.md
  - https://docs.corefinity.com/api/reference/deployments/create-site-deployment.md
  - https://docs.corefinity.com/api/reference/deployments/list-site-deployment-branches.md
  - https://docs.corefinity.com/api/reference/deployments/update-site-deployment-mode.md
  - https://docs.corefinity.com/api/reference/deployments/list-site-deployment-repositories.md
  - https://docs.corefinity.com/api/reference/deployments/update-site-deployment-repository.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_get.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_mode_set.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_repositories_list.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_branches_list.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_repository_set.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployment_trigger.md
---
# Deploy, stop, retry and roll back

Start a deployment from Git, stop one that is running, retry one that failed, and roll back to the previous release.

## Before you start

- You are an owner, or your role has the permission for the action: **Create Deployments**, **Stop Deployments**, **Retry Deployments** or **Rollback Deployments**.
- The site has a repository connected: see [Connect a repository](/guides/sites/code-and-deployments/connect-a-repository).
- Each environment has its own deployments: choose **Production** or **Staging** in the site header first.

## Deploy

1. **Choose what to deploy**

   Go to **Managed Websites**, choose the site, then **Deployments** under **Code & backups**. On the **Deployments** card, leave the box empty to deploy the head of the branch, or enter a branch, tag or commit.

   _Screenshot: The Deployments card: the box for a branch, tag or commit reading main (default), Deploy ringed beside it, and the deployments, newest first, with their status, source, who triggered them, when and how long they took. One reads Failed, with its error beneath and a Retry button._

2. **Start the deployment**

   Choose **Deploy** beside the box. **Deploy** in the site header deploys the head of the branch, and asks you to confirm first.

   _Screenshot: The Deploy main now? dialog that opens from Deploy in the site header: it builds the head of main from the repository and makes it the next release, with the buttons Cancel and Deploy._

The deployment joins the top of the list as **Running**. When it reads **Succeeded** it is the site's **Current** release.

## Stop a running deployment

1. **Stop the deployment**

   Choose **Stop** on the **Running** row, then **Stop** again to confirm.

   _Screenshot: The Deployments card while the newest deployment is Running in its build, with Stop ringed on its row and a note to wait for it to finish or stop it._

   _Screenshot: The Stop deployment dialog: Stop this deployment? The site stays on its current release, with the buttons Cancel and Stop._

The site stays on its current release. While a deployment runs, **Deploy** and **Roll back** wait until it finishes.

## Retry a failed deployment

1. **Retry the deployment**

   Choose **Retry** on the **Failed** row, then **Retry** to confirm.

   _Screenshot: The Retry deployment dialog: a warning that this puts an older release live than the newest deployment, the stage it failed at, the commit that is built again, and the buttons Cancel and Retry._

The same commit is built and deployed again. When newer code has been deployed since, the dialog warns that the retry puts an older release live: push a fix and deploy that instead.

## Roll back

1. **Roll back the release**

   On the **Current** row, choose **Roll back to #857** (the button names the previous release), then confirm.

   _Screenshot: The Roll back to release 857 dialog: htdocs will point at that release straight away, a warning that the database is not changed, and the buttons Cancel and Roll back to 857._

   > **Warning:** A roll back does not change the database. If the release you are leaving added tables or options, check the site afterwards.

The site points at the previous release straight away: nothing is rebuilt and uploads are untouched. Only the previous release can be rolled back to.

A deployment whose archive was removed after 30 days cannot be retried or rolled back to: deploy the branch or commit again.

## Automate this

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

```bash
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/deployments \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{}'
```

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

```json
{
  "name": "corestack_deployment_trigger",
  "arguments": {
    "site_id": 4211,
    "ref": "main"
  }
}
```

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

## Related

- [Deployment log](/guides/sites/code-and-deployments/deployment-log): Find the command that failed.
- [Pipeline](/guides/sites/code-and-deployments/pipeline-stages): Change what a deployment runs.
- [Backups](/guides/sites/backups/snapshots): Take a backup before a change.
