Roll back to a previous version
Put one of the last 10 versions of a site live.
Select Rollback next to a version in the site's version history. Fleet tells you when the database also needs a restore.
Before you start
- You are a Developer, Admin or Owner, or your custom role holds
deploys:write. See Roles and permissions. - Fleet rolls back sites it created. A linked site has no version history and no rollback.
- A rollback changes code and bindings only. The contents of D1, R2 and KV stay as they are.
- A database restore needs
restores:write, which Owners and Admins hold, and a sign-in within the last 30 minutes. See Restore a database during rollback. - A running job of the site makes the rollback wait.
Steps
- Open the site and find its version history.
- Select Rollback next to the version you want. The dialog lists the 10 newest versions other than the live one. After a deploy or an update that failed once it was live, it also lists the current version, labeled "Version <n> (current)".
- Read what the dialog says about that version. It offers a plain code rollback, warns about the database, or gives a reason the version is not offered.
- For a plain code rollback, confirm. Fleet offers one without a warning only when no later version ran a database migration.
- When the dialog warns about the database, choose the option that restores the database, or select the checkbox Roll back the code anyway.
- Follow the job page until it ends.

Result
The chosen version is live and marked current in the version history. Fleet checks the site's health.
If something goes wrong
The dialog shows one of these messages.
Versions after this one changed the database, so rolling back the code alone can break the site.
Cloudflare no longer holds this version, so Fleet cannot roll back to it.
A resource this version used was deleted, so Cloudflare would refuse this rollback.
No recovery point is known to come before the database changes made since this version, so Fleet cannot restore its database.
A version shows Recovery point expired with this reason. A recovery point is kept 30 days on Workers Paid and 7 days on Workers Free.
The recovery point this rollback would restore is older than <days> days.
The job page shows these messages.
Cloudflare refused this rollback because a resource the version used no longer exists. Deploy the site again, or open the site page to Recreate its resources or Unlink it.
The database may have changed after you chose this rollback, so rolling back the code alone can break the site. Select Rollback again to see the options.
A retry cannot change these two. The job offers none.
The recovery point of this restore expired, so the database was not restored. Open the site page and select Rollback again to see the options.
A resource this site needs no longer exists, so Fleet changed nothing. Deploy the site again, or open the site page to Recreate its resources or Unlink it.
Read Rollback asks for a database restore for the next step. Never send a token, a password or an API key to support.