Migrating from Studio v2
Learn how to migrate Sanity Studio from v2 to v3
Sanity Studio v3 provides exceptional flexibility and an unparalleled developer experience so you can create a content system to fit your business. To create the new studio customization framework, we conducted a major rewrite of Sanity Studio’s API surfaces and application architecture. It was not possible to create Studio v3 without introducing breaking changes from Studio v2. We do our very best to avoid breaking changes and are proud to have maintained Studio v2 since October 2020.
Below is a high-level overview of what you need to consider migrating from Studio v2 to v3. You can also look at the following resources:
- Migration Cheat Sheet: Snippets and quick look-up of common configuration and customizations
- Step-by-step guide: This takes you through a Studio migration step-by-step
- In-depth articles on different API surfaces
- The legacy documentation for Studio v2
The points below should give you a quick sense of the work that’s involved in migrating from Studio v2 to v3.
The amount of work depends on how much customization you have done that relies on importing Parts and other studio dependencies.
- Remove the following deprecated packages from
- Install the
sanity@latestpackage from npm
- Upgrade the following dependencies if you have them
- Move and adapt your Studio configuration from
- Replace any
import X from part:Xstatement with new public Studio APIs
- Move custom components to the new
componentsproperty in the Schema API
- Update any plugin you use to the new version that supports Studio v3
- You’ll need to port the configuration for your plugin from
sanity.jsonto the new Plugin API
- replace any
import X from "part:X"statement over to the new public Studio APIs
- Distribute the plugin on npm
- Verify the plugin package with our plugin tooling
Sanity Studio v3 doesn't introduce any breaking changes to the editing experience, only improvements, like better global search. As a content creator, you should expect your workflows to be the same.
We will continue to fix critical bugs in Studio v2 until the end of standard support on December 7th, 2023. You can set up and configure Studio v3 in parallel to your current production Studio running on a previous version.
The Content Lake data store and associated APIs that host and distribute content created from the Sanity Studio have not been changed and are not impacted by the aforementioned changes.