File history and undo
Every change to a source file is kept — how to look at earlier versions and put one back.
Every time a file on your website is overwritten or deleted, its previous contents are kept. Not a summary of the change — the whole file, exactly as it was. That is true whether the assistant wrote it, you typed it in the code editor, you changed a field in Edit mode, or you edited a row in the Content place.
It is the safety net under everything else: nothing you or the assistant does to a source file is unrecoverable.
Opening it
File history lives in the code editor, so it needs developer mode. Open a file in the editor and choose History in its toolbar.
The popover lists the file's saved states, newest first, each with when it was saved and who saved it — you, a teammate, or the assistant. Restore beside any of them puts those contents back as the file's current contents in one click.
Looking before you restore
Click a saved state itself and the editor becomes a comparison: that save on the left, the file as it is now on the right, with every changed line marked. Nothing is written by opening it. Restore this save, above the comparison, restores it; Close returns to the editor with the file untouched. Opening a different file closes the comparison too.
What restoring does
Restoring is an ordinary save. It writes the old contents as the file's new contents, which means:
- The restore is itself recorded in history, so you can undo the undo.
- If the file is a Blade template, the site recompiles, exactly as after any other edit.
- The safety checks that apply to every save apply here too.
It affects one file. If a change spanned several files — a redesign usually does — restoring one of them leaves the others where they are. For that kind of walk-back, asking the assistant is usually better: "undo the header change you just made." To go back to your whole website as it stood at an earlier point, use version history instead.
The limits
- Each file keeps its newest 50 saved states. Older ones fall away as new ones arrive.
- History belongs to a version. Publishing does not clear it, but very old versions are eventually pruned, and their history goes with them.
- Some things are deliberately not recorded: brand-new files (there is no prior state), saves that changed nothing, compiled output rebuilt from your sources, and images. Images live in the media library instead.
Next
- Version history — going back to a whole earlier website.
- Developer mode — turning the code editor on.
- Building with Blade — what the files you are restoring actually are.