Why sharing one Sanity dataset between staging and production is risky, and how to split them
Staging and production environments that read from the same Sanity dataset can expose live content to test edits, failed migrations, and preview leaks. The author notes this setup is common in inherited projects, where preview URLs look like staging but point to the live data. Symptoms include editors hesitating to create drafts, identical content on both sites, and no clear way to tell test documents from real ones. The recommended fix is to back up the production dataset first, then create and import a separate staging dataset, and only afterward update configuration. The guide also suggests separate Studio workspaces with distinct URLs so editors can see which environment they are in.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in