Skip to main content
Deploy

Rolling back deployments

Restore a previous Production deployment without rebuilding it.

Instant Rollback changes production routing to a previous Ready Production deployment.

Use it when a newer release is unhealthy and a previous release is known to work. Instant Rollback does not rebuild the application.

You need an Owner or Admin role. Members can view deployments but cannot roll back.

If the project is paused or the workspace is suspended, Instant Rollback is blocked.

How Instant Rollback works

Instant Rollback:

  1. Identifies a previous Ready Production deployment older than Current
  2. Reassigns the production hostname and live custom domains to that deployment
  3. Leaves the newer deployment in deployment history
  4. Turns off Auto-assign production domains so a later production-branch build does not immediately overwrite the rollback
  5. Records the rollback in project activity

Environment variables and build output stay as they were when that earlier deployment was built.

What rolls back

Instant Rollback restores deployment-owned resources such as:

  • Static assets
  • Functions
  • Routing configuration
  • Framework output
  • Deployment metadata

It does not automatically restore external state, including:

  • Databases
  • Third-party service changes
  • Queues
  • Object storage mutations
  • Secrets changed after the original deployment
  • External migrations

Design database changes to remain compatible with both the new and previous application versions when fast rollback is required.

Roll back from the dashboard

From the project overview or deployment history:

  1. Select a previous Ready Production deployment older than Current
  2. Review its source revision and creation time
  3. Choose Instant Rollback and confirm

The deployment becomes Current without entering the build queue. Preview-only deployments are not eligible.

After a rollback

New pushes to the production branch still build, but they stay Staged and do not replace the rolled-back deployment until you:

  • Choose Undo Rollback on the project overview
  • Turn Auto-assign production domains back on in Project settings → Environments
  • Promote a staged or newer Ready Production deployment (that also re-enables auto-assign when the disable reason was a rollback)

Roll forward

To reverse a rollback without rebuilding, promote the newer Ready Production deployment again. See Promoting deployments.

Rollback limitations

Instant Rollback is unavailable when:

  • The deployment is not Ready Production
  • The deployment is not older than Current
  • The deployment has been spun down
  • The project is paused or the workspace is suspended
  • You lack Owner or Admin permissions

Cache behavior

Instant Rollback does not automatically purge ISR or runtime caches.

Caches are keyed by deployment ID, so traffic follows the rolled-back deployment's cache namespace. Edge responses follow the newly aliased deployment's routes and assets. Clear cache from the dashboard when you need an explicit purge.