Which documents keep a version history
-
What you'll see
You open the History of a document and the list is empty, or
docly historyanswers that the document is not versioned. Or you expected to roll back a file a script wrote, and there is nothing to roll back to. -
What's actually happening
Docly stores a version of a document each time it is saved, but only when both of these are true:
Condition Where it is set The document's schema has EnableVersioningturned onThe schema document The workspace's subscription includes Revisions The subscription (depends on the plan) Most files on a site have a schema, and it versions. A file is stored with the schema its extension maps to. The platform schemas all have
EnableVersioningon:Schema Files Code File Text files: .hash,.js,.css,.html,.json,.md,.svg,.txtand other code and config formatsUploaded Image Images Uploaded File Other uploads (PDF, ZIP, binary files) For an upload, the version holds the document's values, which point to the stored file. The file itself is kept as long as a version refers to it, so an older version can be restored with its file.
A workspace can override a platform schema with its own schema of the same name; then that schema's
EnableVersioningdecides.Documents without a schema have no history at all. The usual source is a script:
docly.saveFile(path, data)without a schema creates a schemaless file (this is how counters, logs and cached JSON are meant to be stored). Saving such a file overwrites the previous content.docly historyshowsVersioned: falsefor them.The rule is the same for every way a document is written: the editor, the
doclyCLI and MCP, the AI assistant, unzipping, package installs and your own scripts. None of them can create a version the rule does not allow, and none of them skips one it does.Turning Revisions off stops new versions only. The versions that already exist are kept and can still be opened, compared and restored. The History dialog says when the subscription has turned versioning off, so an empty list is not mistaken for a document that never changed.
-
What to do
Read and compare versions
In the editor, open History on the document. From the command line:
docly history <document> # list the versions docly history <document> --version 3 # print version 3 docly history <document> --version 3 --diff # what changed since version 3 docly history <document> --version 3 --label "before redesign" docly history <document> --version 3 --out old.jsonTo restore an older version from the command line, write it to a file with
--outand put it back withdocly put. Restoring creates a new version; nothing in the history is removed.Still review before you save
A version lets you go back after a mistake has gone live; it does not stop the mistake from going live. Templates and scripts are where a mistake takes a site down, so work on them in a
doclyCLI working copy and usedocly diffbefore anything is pushed — see Use a docly CLI working copy instead of git and Work safely on a live site.Choose versioning for your own schemas
Set
EnableVersioningon schemas whose documents people edit and may want to undo: content pages, settings, data records. Leave it off for documents that scripts rewrite constantly (counters, logs, caches) — every save is a stored copy. The same goes for files your scripts save: give them no schema when they change all the time and need no history.
Last reviewed 23 Oct 2026