Broken release? Roll back with the database, or restart the app

A new release went live but broke the site? Roll it back from the Releases tab, restore the database to before its migration, or just restart the app.
Your AI shipped a new version and the release history says Active. Then you open the site: the order button does nothing, a list page throws an error, or data looks wrong because a migration changed a table. Customers are using the site right now, and you don't want it broken while the AI hunts for the cause.
BrewInTH gives you three ways back: roll the code back to an earlier version, roll the code back and return the database to the moment before the migration, or restart the app when the code is fine but the app is stuck. The last two arrived on 21 October 2026. This guide covers which one fits which problem, where to press, what goes back and what doesn't, and how to let your AI fix things without breaking them again.
In short
↩️ Roll back: Releases tab › a Previous release row › Restore this release; nothing is built again
🗄️ A migration broke the old code? Tick the box to restore the database from the Before release command copy at the same time
🛟 The current data is always backed up first, and if the old version can't come back, it is put back for you
🔄 App stuck but the code is fine? ⋯ › Restart the app; code and data stay as they are
⚠️ Files in /bw-data don't go back, and app settings always keep today's values
Three ways back: match the symptom

- Roll back the code when the new code has a bug but the database still works with the old code, for example when the new version only added tables or columns.
- Roll back with the database when the new version's migration dropped, renamed or retyped columns so the old code can't read the database any more, or when the migration damaged data.
- Restart the app when the code hasn't changed but the app hangs, is unusually slow, or lost its database connection after the database restarted.
If the new release shows Failed, there's nothing to roll back: the previous version is still serving. Since 30 October 2026 that also holds for sites with persistent storage (/bw-data), where the platform brings the previous version back by itself. To have your AI read the logs and fix a failed release, see Deploy failed or site slow? Let AI read the logs and fix it.
Roll back to an earlier version, step by step
1. Open the release history
Open the project, go to the Releases tab and scroll to Release history. Each row is one version with an 8-character code, a status and a time. Active is the version online now. Previous release rows were online before and carry the button to go back to them. Failed rows never went live, so they have no button.
2. Pick a version that worked
Usually it's the Previous release row just below the broken one. If you're unsure, compare the times with when the trouble started, or press View log. Then press Restore this release on that row.
3. Read the dialog before you confirm
The Restore release (code)? dialog says the version's code comes back as a new release in the history without a new build, and that the current release keeps serving if the return fails. Below that it lists the release commands (migrations) that ran after this version, which means the old code will meet a changed database; with none, it says No release command (migration) ran after this version. When a backup can be used, there is also a box to tick: Also restore the database from the “before release command” copy …. Read the next section before ticking it.
4. Press "Restore this release" in the dialog
A new row appears at the top of the history, reading code of release (old code) · restored on (time). It shows Deploying, then Active. The broken version becomes a Previous release, and the row you pressed stays where it was, ready to be pressed again.
Meanwhile the current version keeps serving until the restored one is ready. A static site switches almost at once. A site with /bw-data has to stop the current version first, so visitors may wait a moment or see a page saying the site is switching to a new version, which reloads itself within seconds.
If the dialog doesn't close after you press, the platform refused. Press Cancel and read the message under the button on that row (see "Can't roll back?" below).
5. Check the live site
Press Open site and try the page that broke. Still broken? Try one version further back, or consider restoring the database as well.
Roll the database back too, with the "Before release command" copy
Many sites have a release command, such as php artisan migrate --force for Laravel, npx prisma migrate deploy for Prisma or python manage.py migrate --noinput for Django. The platform runs it before visitors move to the new version. Since 18 October 2026, every time it runs, the project's databases (Redis aside) are backed up first as a Before release command copy on the Databases tab. Every account gets this; the Backups add-on is not needed.
The box in the rollback dialog uses the copy taken before the first release command that ran after the version you picked: the database as it was before the migration the old code doesn't know about.

- The current data is backed up as a Before restore copy.
- The Before release command copy is restored. The current version is still online while its database is replaced, so the site may be unusable for a moment.
- The chosen version's code comes back. Nothing is built, and a release command that version already ran is not run again.
- If step 3 fails, the database is restored from the Before restore copy of step 1 and the current version is restarted to keep serving.
The restored row then ends with database restored from (code). Before ticking, compare the code in the box with the times on the Databases tab to make sure it is the copy from just before the migration that broke things. Afterwards, check Recent activity on the Overview page: the Restore the database operation should read Succeeded.
Data added since then leaves the site
A restore replaces the whole database, not just the table structure. Orders, sign-ups and messages that arrived after that copy are no longer on the site, but they are still in the Before restore copy. Download it from the Databases tab and let your AI bring back the rows you need. If the new version has been live for a while with plenty of activity, try rolling back the code alone first, then have the AI fix the database where needed.
No box to tick, or the wrong copy in it
- The app runs its migrations itself at start. The platform doesn't know a migration happened, so nothing was backed up first, and the dialog says no release command ran even though the database changed. Ask your AI to move the migrations into the Release command (runs before the release goes live) field, on the Releases tab under Advanced options (build / start / port).
- The migration ran before 18 October 2026. Those copies didn't exist yet. The box either doesn't appear or offers the copy of a later migration, which isn't the one you want. Restore another backup from the Databases tab yourself instead.
What goes back and what doesn't

- App settings on the App settings tab keep today's values, not the ones from that version's day. If the new version had your AI rename a setting or change what it means, put it back before rolling back.
- Files in /bw-data, such as user uploads, don't go back. If the new version overwrote or deleted files, use the Volume backups (/bw-data) panel: Back up and restore /bw-data on BrewInTH.
- Schedules and the Commands tab run the code of the active version, so after a rollback they run the old code. Domains and mailboxes stay as they are.
Can't roll back? Messages you may see
- Request failed: rollback_file_removed: a file that version used has been deleted or replaced, for example the ZIP of an older version after several hand-overs on the Upload & go live page, or after your AI tidied up files. On the Files tab, open deleted files (the line reads N deleted file(s) in the trash (can be restored)), Restore the files uploaded shortly before that version (see the Uploaded column), then press the rollback again. More in Deleted a file by mistake? Restore it from the BrewInTH trash.
- A release is under way; wait for it to finish, then send again: another version is going live; let it finish first.
- The project is paused. Resume it first.: press Resume at the top of the project page.
- This backup is not complete yet or failed: the copy the box points to is gone or never finished. Only the latest 3 Before release command copies are kept per database; older ones move to the server's trash. Untick the box to roll back the code alone, or restore another backup yourself on the Databases tab. For a copy in the trash, ask the team.
Restart the app: when that's all you need
Press the ⋯ button at the top right of the project page (hover it and it says Project actions) and choose Restart the app. It starts right away, without asking again. The button is there for app sites that are live and not paused; static sites don't have it.
A restart changes no code and touches no data: the same app simply starts afresh. On most sites a new copy gets ready first and then the old one stops, so visitors hardly notice. A site with /bw-data has to stop and start again, and visitors briefly see a "the app is starting up" page that reloads itself within seconds.
Use it when the app hangs, gets unusually slow, or keeps using more memory until a restart fixes it (if it keeps happening, have your AI find out why), or when it can't reach its database after the database restarted, since some apps don't reconnect on their own.
You don't need it when
- you restored a database from the Databases tab: the platform restarts the app after the restore by itself;
- you just changed a value on the App settings tab: a restart doesn't load it; values saved after the active version started apply with the next release, for example Build & publish again;
- the code has a bug: roll back or ship a fixed version;
- the site is asleep (autosleep): the first visitor wakes it with a fresh start anyway.
After the rollback: let your AI fix it without breaking it again
With the site back, give your AI time to fix things properly. Tell it which version is live, whether the database went back, and keep migrations from dropping or changing columns in a single release. Copy this, fill in the blanks and send it in your usual chat:
My site on BrewInTH: the latest version (code ________) went live but ________
I pressed "Restore this release" to go back to version ________; the database [was / was not] restored
- Read the log of the broken version in the release history and tell me the cause before changing anything
- Keep migrations in the project's release command, not in the app's start-up
- Never drop, rename or retype a column in the same release that stops using it: add the new one first, remove the old one in the next release
- New NOT NULL columns need a default
- Never wipe or reset the database
- After shipping the fix, open the page that broke yourself and tell me what you changed
The third rule matters most. The console itself warns under the release command field that a migration which drops or retypes a column breaks the running version for about 20 seconds while traffic switches. Split into two releases, the old code can always read the database, and rolling back the code alone is enough. For describing a problem so the AI gets it quickly, see How to report a bug so AI fixes it.
FAQ
I rolled back. Can I go forward to the new version again?
Yes: the new version's row is now a Previous release with its own Restore this release button. But if you ticked the database box when rolling back, the database is back to its pre-migration shape, and restoring a version doesn't run its release command again. In that case ship the code as a new release, so the migration runs once more.
Can I roll the database back without the Backups add-on?
Yes. The Before release command and Before restore copies are made for every account. The Backups add-on (฿99 a month at the time of writing) adds daily backups and the Back up now button, which help when data goes wrong for other reasons. More in Back up and restore your database on BrewInTH.
How far back can I go?
The code can go back to any Previous release whose files are still there. Rolling back with the database works for the last few versions only, because the latest 3 Before release command copies are kept per database.
I pressed Restart and nothing seemed to happen
There's no confirmation and no success message; if it fails, a message appears under the ⋯ button. Wait a moment and open the site. If the problem is still there, open the Logs tab and send what it shows to your AI.
Summary
A broken release doesn't have to stay live while you fix it. Press Restore this release on a Previous release row first. If a migration left the old code unable to read the database, tick the box to restore it from the Before release command copy, knowing that newer data leaves the site but stays in the Before restore copy. If the app is only stuck, Restart the app is enough. Then have your AI split migrations that drop or change columns into two releases. For real screenshots step by step, open User guide › Releases, logs and rolling back in the console.
