Roll back a bad deployment
When to use this: You deployed and the live site is broken. Restore a previous version fast.
Before you start
Steps
-
Roll back in the dashboard (fastest)
Project, Deployments. Open the last good Production deployment, click the three dots, then 'Instant Rollback' (or 'Promote to Production'). Availability of Instant Rollback depends on your plan; promoting an older deployment always works.
-
Or with the CLI
terminalvercel rollback <deployment-url>Points Production back to that earlier deployment. Copy the URL of the last good deployment from the Deployments tab. Run
vercel rollback --helpif your CLI version behaves differently. -
Make Git match: revert the bad commit
terminalgit revert HEAD git pushWithout this, the next push to
mainwould deploy the bad code again. For a merge commit usegit revert -m 1 <id>.
How to verify it worked
- The domain serves the earlier version, and the Deployments tab shows it as current Production.
How to undo it
Rolled back by mistake: in Deployments open the newer deployment and promote it again.
Common errors and fixes
Q&A
Rollback vs git revert, which one?
Both, in order: rollback restores the site in seconds; revert fixes the source so the next deploy is also good.