Multiple environments and studios in Sanity Studio setup.

18 replies
Last updated: May 19, 2022
we have set up our Sanity Studio like this, - 4 datasets:

But we found out that when doing changes to the studio in one dataset it changes to all datasets in the same Studio.

user H
tells me we need 4 different environments and studios to avoid this, is this how Sanity has built this?
We only use this for one website, so I think it is a bit strange to have 4 different projects.

Please explain how you have built this. Thanks
May 19, 2022, 8:07 AM
At Gorillas, we do use 2 different projects for the 2 environments of the same website, indeed. And we have a script to backport production data onto the development environment to make it easier to work on actual data.
May 19, 2022, 8:09 AM
But we found out that when doing changes to the studio in one dataset it changes to all datasets in the same Studio.
Could you elaborate on this? Are you saying that changes you make in the studio is reflected in all datasets? (The studio can’t do requests to multiple datasets at once)
May 19, 2022, 8:10 AM
user Y
user H
will elaborate on this.
May 19, 2022, 8:12 AM
There are different ways of slicing and dicing projects/datasets/studios. The most common way is to have one studio, one project, and use datasets for dev/staging/prod environments.
In these cases, it’s often better to deploy the studio to another hosting solution (like Vercel or Netlify) and use environment variables to control its dataset configuration. Then you can access the studio on
or something along those lines.
May 19, 2022, 8:13 AM
Yeah, that is what I was hoping for also.
May 19, 2022, 8:14 AM
let me correct the question a bit, so we have 4 datasets that we have created for seperate environments. but as sanity only has one studio instance. any dev change that we do to sanity scheme is reflected in studio before even getting qa tested. so my proposed solution is to host multiple sanity studio instances so that devs can do changes and deploy to that particular env to test without changing the production schema
May 19, 2022, 8:15 AM
I see. Then I’d look at hosting the studio on e.g. Vercel that also supports PR and branch deployments. This is what we do internally at Sanity 🙂
May 19, 2022, 8:16 AM
yup. thank you. this is whats proposed internally from our dev team as well. 🙂
May 19, 2022, 8:16 AM
hosting is made for simple use cases to get started quickly.
May 19, 2022, 8:16 AM
Great. We are using Vercel as well
May 19, 2022, 8:16 AM
So we move the studio hosting to vercel, then it will be resolved. Any good resources on migration or moving or is it easy peasy?
May 19, 2022, 8:18 AM
May 19, 2022, 8:18 AM
It should be enough to point Vercel to the studio repo. It should have automatic config support
May 19, 2022, 8:18 AM
user E
its fairly straightforward process to deploy sanity in Vercel
May 19, 2022, 8:19 AM
Great stuff, thanks for your quick feedback Knut 👍
May 19, 2022, 8:19 AM
Thank You again for quick support and feedback. 🙂
May 19, 2022, 8:20 AM
May 19, 2022, 8:22 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?