Missing Unpublish Option in Sanity Studio v2.25
I can see you're on Sanity Studio v2 and missing the unpublish option! This is almost certainly because you have liveEdit: true set in your document schema.
When a document schema has liveEdit: true, Sanity treats it as "live only" - meaning changes are saved directly to the published version without creating drafts. Since there's no draft/published distinction for these documents, the unpublish action doesn't appear in the document menu.
To fix this:
Check your schema definition for the document type you're trying to unpublish. Look for something like this:
export default {
name: 'yourDocumentType',
type: 'document',
liveEdit: true, // <-- This is the culprit
fields: [
// your fields
]
}Remove or set liveEdit: false:
export default {
name: 'yourDocumentType',
type: 'document',
// liveEdit: false is the default, so you can just remove the line
fields: [
// your fields
]
}After removing liveEdit: true and restarting your Studio, you should see the unpublish option appear in the document menu. The document will now use Sanity's draft system, where changes are saved as drafts (with drafts. prefix) before being published.
Important notes:
- If you have existing live-edit documents, they'll continue to work after you change the schema, but new edits will create draft versions that need to be published.
- The
liveEditoption is useful for certain use cases where you want immediate updates without a publish step, but it does remove the unpublish functionality since there's no separate published state to revert from. - In Studio v2, this is a schema-level setting. If you need drafts disabled globally, you'd need to add
liveEdit: trueto each document type individually.
The unpublish button will reappear once you've removed the liveEdit: true setting from your schema!
Show original thread7 replies
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.