👀 See Sanity in action: Watch product demo now →

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.

Migration resources

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 overview

The points below should give you a quick sense of the work that’s involved in migrating from Studio v2 to v3.

Migrating Sanity Studio projects

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 package.json:
    • @sanity/base
    • @sanity/core
    • @sanity/default-layout
    • @sanity/default-login
    • @sanity/desk-tool
  • Install the sanity@latest package from npm
  • Upgrade the following dependencies if you have them
    • "@sanity/ui": "^1"
    • "react": "^18.2.0"
    • "react-dom": "^18.2.0"
  • Move and adapt your Studio configuration from sanity.json to sanity.config.js
  • Replace any import X from part:X statement with new public Studio APIs
  • Move custom components to the new components property in the Schema API
  • Update any plugin you use to the new version that supports Studio v3

Plugin authors

  • You’ll need to port the configuration for your plugin from sanity.json to 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

Content creators

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.

Sanity Studio v2 End of Life

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.


Was this article helpful?