A deployment rollback plan gives you a controlled way to recover when a release breaks a layout, introduces errors, disrupts forms, or harms performance. This guide explains how to decide between fixing forward and reverting, what to prepare before release, how to roll back across common hosting workflows, and which checks to repeat during regular recovery drills.
Overview
A rollback is the deliberate restoration of a previously known-good website version. It is not the same as refreshing a browser, clearing a cache, or making an emergency edit directly on production. A useful rollback returns the application, assets, configuration, and—when safe—the data layer to a compatible state.
The safest approach treats rollback as part of normal release management rather than an improvised response to an incident. Before each deployment, identify the version you would restore, confirm that the necessary credentials work, and record any database or configuration changes that could affect recovery. If the release fails, the team can follow a short, familiar procedure instead of searching through old messages or guessing which files changed.
Rollback is usually appropriate when a release causes a broad or high-impact problem and the previous version is known to work. Examples include a site-wide error, broken checkout or contact forms, a severe layout failure on important devices, incorrect access permissions, or a sharp and unexplained performance regression. A small isolated defect may be safer to fix forward if the change is easy to verify and the existing release remains stable.
Release or rollback?
| Situation | Preferred first action | Reason |
|---|---|---|
| Most visitors cannot load the site | Roll back | Restore availability before investigating details. |
| A key form, payment flow, or login fails | Usually roll back | Business-critical functions need a known-good path. |
| A minor visual defect affects one page | Fix forward if risk is low | A targeted correction may be faster than restoring unrelated work. |
| The release includes an incompatible database migration | Pause and assess | Code rollback alone may not undo a data change safely. |
| The cause is uncertain and the old release is unavailable | Stabilize and investigate | Do not replace one unknown state with another. |
What to track
A deployment rollback checklist should capture more than a release number. Track enough context to identify the change, restore it, and verify the result.
- Release identity: Record the Git commit, build identifier, package version, or website-builder revision. Label the last known-good version clearly.
- Deployment time: Note when the release started and when symptoms first appeared. This helps separate deployment-related failures from unrelated traffic, DNS, certificate, or provider incidents.
- Changed components: List application code, templates, stylesheets, images, third-party scripts, environment variables, DNS records, and server settings that changed.
- Database status: Record whether migrations, content imports, schema changes, or one-time scripts ran. A database backup is not a substitute for checking whether the older code can read the current data.
- Health signals: Monitor HTTP status codes, error logs, form submissions, login or checkout tests, page load behavior, and resource usage. Uptime alone will not reveal a broken feature that still returns a successful HTTP response.
- Cache and asset state: Note CDN, hosting, application, and browser-cache behavior. Old HTML combined with new JavaScript, or the reverse, can make a successful rollback appear broken.
- Recovery access: Confirm access to the hosting dashboard, deployment system, repository, backups, DNS provider, and any required approval process. Store credentials securely; do not place secrets in the rollback document.
For a broader pre- and post-release review, use the website launch technical QA checklist. If your workflow lacks a safe preview environment, the staging website guide can help you separate testing from production changes.
Cadence and checkpoints
Review the rollback plan before every meaningful release, then perform a lightweight readiness check monthly or quarterly, depending on how often the site changes. A plan that worked last year may fail after a hosting migration, repository change, new deployment tool, or redesign.
Before deployment
- Confirm the current production version and mark it as the rollback target if it is healthy.
- Create or verify a backup according to the site’s recovery requirements. Review the website backup strategy for cloud hosting for guidance on files, databases, and retention.
- Review migrations and configuration changes. Decide in advance whether each data change is backward-compatible, reversible, or safe only after a forward fix.
- Test the release in staging or preview using representative pages, forms, authentication, integrations, and mobile layouts.
- Write down the exact rollback command or dashboard path, the responsible person, and the verification tests.
Immediately after deployment
Run a short smoke test before announcing the release: load the homepage and several important pages, submit a test form where appropriate, check authentication, inspect browser-console errors, and confirm that critical assets load. Compare response times and error rates with the pre-release baseline rather than relying on a single personal browser session.
During a scheduled drill
Use a non-production environment whenever possible. Restore a previous build, confirm that configuration and assets are present, test the database connection, and document how long each step takes. A drill should reveal missing permissions, stale instructions, unavailable backups, or dependencies that were not included in the original plan.
How to interpret changes
When a release causes trouble, first establish scope and timing. If errors began immediately after deployment and affect multiple routes or user types, rollback has a stronger case. If only one browser or cached asset is affected, investigate cache behavior before changing production again. If DNS or HTTPS is involved, check records and certificate status separately; the DNS records guide and SSL certificate guide cover those failure areas.
After reverting the application, do not assume the incident is over. Purge or refresh the relevant cache only when you understand which layer is serving stale content. Repeat critical user journeys from a clean session, then check logs and monitoring for a reasonable observation period. The uptime and performance monitoring guide provides a useful framework for ongoing checks.
Database changes require particular caution. Restoring older code against newer data can produce missing-field errors, incorrect assumptions, or silent data problems. Prefer backward-compatible migrations: add new structures before using them, avoid destructive changes until older versions are no longer needed, and take a verified backup before irreversible operations. If data has already changed, pause before restoring a database snapshot because doing so may discard legitimate activity created after the release.
Performance symptoms also need comparison, not guesswork. Track page response time, asset size, cache status, server resource use, and real user actions before and after the release. If the site is available but slower, a rollback may be justified when the impact is broad; otherwise, isolate the largest change and test a targeted fix. See the repeatable performance optimization workflow for a structured investigation.
When to revisit
Revisit this rollback plan before each production deployment and on a monthly or quarterly schedule. Update it immediately after changing hosting providers, deployment platforms, Git branches, database technology, DNS management, SSL automation, caching, or website-builder workflows. Review it after every incident: record what failed, which signal identified the problem, how long recovery took, and what step should be automated or clarified.
For a Git-based deployment, the recovery path may be selecting and redeploying a prior commit, then invalidating the appropriate cache. For managed cloud hosting, it may be choosing a previous deployment from a dashboard or restoring a backup. For a website builder, it may be publishing an earlier revision and checking connected forms, domains, analytics, and custom scripts. Provider terminology and available features change, so verify the current procedure in the relevant documentation rather than relying on an old screenshot.
Keep a compact recovery card with the production URL, rollback target, deployment location, backup location, critical tests, escalation contact, and last drill date. Before the next release, walk through that card and confirm that every link, permission, and credential still works. A rollback plan is valuable only when it can be executed calmly, quickly, and without introducing a second failure.