Version history for your website: see what changed and roll back
See your website deployment history, view file diffs, and roll back instantly to any past version using the CLI, console, or API.
On this page 7 sections
You can roll back your website instantly using vibiz rollback, which switches production back to the previous deployment without configuring git. To inspect your changes first, run vibiz versions to list past deployments and vibiz diff to view unified text diffs between any two versions. thelastapi stores each deployment by content hash, so past builds remain available to restore whenever an update causes unexpected issues.
If a bug reaches production or a new design breaks on mobile, you do not need to pull a repository, revert commits, or wait for a long build pipeline. You can revert your live site from your terminal, the web console, or through an AI agent.
How to inspect your deployment history
Every time you run vibiz deploy, a new immutable version is recorded. You do not need to initialize a git repository or configure webhooks. To view your recent deployments, use vibiz versions:
vibiz versionsThe CLI outputs your deploys in reverse chronological order, newest first. For each entry, you see the deploy message, who deployed it, when it ran, whether it is currently live, and the number of changed files. If you deploy without passing -m, the platform automatically summarizes the file count, such as 3 files changed.
When deploying, adding a brief descriptive message makes browsing your history straightforward:
vibiz deploy -m "Update pricing table and FAQ"To paginate through older releases or inspect output in automated scripts, pass the --limit or --json flags:
vibiz versions --limit 10 --jsonIn your browser, open the project dashboard and navigate to Deployments ▸ Versions. The console displays the same deployment log with clear indicators of what is currently live.
Comparing changes between versions
Before reverting, you often need to confirm which specific file or code snippet introduced a problem. The vibiz diff command compares file contents directly from the server.
Running vibiz diff with no arguments compares the live site against the working version immediately before it:
vibiz diffYou can also target specific deployments:
# Compare a specific deployment against the one before it
vibiz diff dep_abc123
# Compare two arbitrary deployments
vibiz diff dep_old456 dep_new789File counts and diffs are calculated against the newest working deployment before that version. Text files up to 512 KB are compared, covering up to 100 files and 200 KB of total changes in a single diff. If changes exceed those limits, the output sets truncated: true and includes a note for each omitted file. For binary files, the diff lists file sizes rather than content.
If you only need to inspect raw files from an earlier release without running a full diff, use vibiz code:
# List all files stored in the live deployment
vibiz code ls
# View the contents of a specific file from an older deployment
vibiz code cat src/index.html --deployment dep_abc123You can also pull the live deployment's files down into a local folder using vibiz pull my-site. For more details on editing existing assets, read how to edit a live site by deploying only what changed.
Rolling back to a previous version
When you need to restore your site immediately, run vibiz rollback:
# Roll back to the deployment right before the current live version
vibiz rollback
# Roll back to any specific older deployment id
vibiz rollback dep_abc123In the console, you can achieve the exact same result under Deployments ▸ Versions by clicking the Go back to this version button next to any successful deployment.
How fast a rollback completes depends on the deployment type and age:
| Deployment state | Rollback behavior | Time required | Environment variables used |
|---|---|---|---|
| Recent production deployment | Instant traffic switch | Instant | Variables from the original build |
| Preview deployment | Rebuilt from stored files | Needs one build | Current environment variables |
| Older production build pruned from host cache | Rebuilt from stored files | Needs one build | Current environment variables |
An instant switch switches traffic immediately because the host still retains the compiled build output. If a build must be reconstructed from stored files, it uses the project's daily build allowance (each project has a limit of 30 builds per UTC day).
Rolling back never deletes newer history. The version that was live before the rollback remains in the version log, which means you can switch forward again at any time using vibiz rollback <deployment-id> or vibiz promote <deployment-id>.
What happens to the database and environment during a rollback
Before initiating a rollback, keep these operational boundaries in mind:
- The database is not rolled back. Only the static files and site code revert. Your database tables, rows, and schema migrations stay exactly as they are. If an older frontend expects a deleted database column or altered schema, queries may fail. To protect your data before making breaking schema changes, always back up your Postgres database as SQL.
- Environment variables depend on the restore method. If your site performs an instant production switch, it serves using the environment variables configured when that version was originally built. If the rollback triggers a rebuild, it compiles using your current environment variables.
- Pending builds override rollbacks. If another deployment is currently building when you initiate a rollback, that build will go live as soon as it finishes. The CLI warns you whenever a build is currently in flight.
- Failed builds cannot be restored. A deployment that failed during its build step cannot be made live.
- Subsequent updates layer on top. The next time you deploy with
base: "live", changes are applied over the restored version.
If an unexpected outage or bad release occurs, Mission Control flags it automatically. You can read more about automated monitoring in our guide to know when your site goes down, a deploy fails or sales stop.
Rolling back from an AI agent or over HTTP
You do not need terminal access to inspect diffs or revert releases. If you manage your website via Claude Code, Cursor, ChatGPT, or custom automations, you can trigger these actions through tool calls or HTTP endpoints.
Using MCP tools in chat
When using the remote MCP connector at https://thelastapi.dev/mcp, an AI agent can execute version operations directly:
// View version history
vibiz_code { "action": "history", "project_id": "prj_123" }
// Compare versions
vibiz_code { "action": "diff", "project_id": "prj_123", "from": "dep_old456", "to": "dep_new789" }
// Revert to the previous deployment
vibiz_rollback { "project_id": "prj_123" }
// Revert to a specific past deployment
vibiz_rollback { "project_id": "prj_123", "deployment_id": "dep_abc123" }Using the REST API
You can script rollbacks in CI pipelines or internal admin panels using the standard HTTP API:
# 1. Fetch recent versions
curl https://thelastapi.dev/v1/projects/prj_123/versions \
-H "Authorization: Bearer $VIBIZ_API_KEY"
# 2. Inspect a diff between two versions
curl "https://thelastapi.dev/v1/projects/prj_123/versions/diff?from=dep_old456&to=dep_new789" \
-H "Authorization: Bearer $VIBIZ_API_KEY"
# 3. Restore the previous production version
curl -X POST https://thelastapi.dev/v1/projects/prj_123/versions/previous/restore \
-H "Authorization: Bearer $VIBIZ_API_KEY"
# Or restore a specific deployment ID
curl -X POST https://thelastapi.dev/v1/projects/prj_123/versions/dep_abc123/restore \
-H "Authorization: Bearer $VIBIZ_API_KEY"Requests made with a key belonging to another account return 404 not_found.
How long version history is kept
Deployments do not expire. Versions remain listed, alongside their file records, for as long as your project exists.
When you upload assets during a deploy, files are deduplicated and stored by content hash outside the hosting runtime layer. If the hosting layer later discards cached build containers to save space, the underlying files remain safely stored. This is why older versions can always be rebuilt and put back into production even months later.
Hosting is currently not charged: builds and live sites are recorded in usage at $0. If you ever decide to delete a project, the live site goes offline immediately, but all project data and version history are preserved for 7 days. During that 7-day window, running restore recovers the project and its full history. For a breakdown of setup costs, check the cheapest way to host a website and database for a side project.
To explore build limits, domain configuration, and manifest deployment commands, visit the Hosting documentation.
Frequently asked questions
Does rolling back my site revert changes in my Postgres database?
No. Rolling back only restores frontend and application code files; database rows, tables, and schema migrations remain untouched.
How many versions does thelastapi keep in history?
Version history has no time limit and past versions are not deleted. They remain available for diffing and rollback as long as your project exists.
What happens if I roll back while a new deploy is building?
The rollback switches the site immediately, but the in-progress build will go live over your restored version once it successfully finishes.
Can an AI agent check version history and trigger rollbacks?
Yes. AI agents connected via the MCP server can list versions with `vibiz_code { action: "history" }`, view diffs, and revert deployments using `vibiz_rollback`.