Upgrading Sanity from V1 to V3 without losing data - is it possible?

13 replies
Last updated: Nov 30, 2025
Hi - I two environments that appear to be quite dated and require updating. Upon running
sanity upgrade
, none of the packages update and I'm given a URL of
<https://www.sanity.io/changelog/studio?from=v1&to=v2>
which 404's.
With research, I see that sanity is now on V3. The 2 sites really aren't that old so I'm a little shocked at how outdated they already are.
After a bit of googling, I can find details on how to upgrade from V2 to V3, but nothing mentioning V1.

Does anyone know if its possible to go from V1 to V3 without losing any data in the datasets and what changes I would have to make around the schema (is the documentation for V2-&gt;V3 still relevant to me)?
AI Update

Good news - your data in the Content Lake is completely safe and separate from your Studio version. Upgrading Studio versions won't affect your content at all, so there's no risk of data loss.

However, you're right that jumping from v1 to v3 is a significant leap. Here's what you need to know:

The Migration Path

Since you're on Studio v1, you'll essentially need to go through two major migrations. The good news from this community thread is that v1 to v2 had minimal breaking changes - you can actually skip directly to v3 if you follow the migration guides.

The reality is that the v2 to v3 migration guidance will be directly relevant to you, though you may encounter some v1-specific patterns that need updating first.

Key Changes Across Versions

Studio v1 → v2:

  • Minimal breaking changes (mostly internal)
  • Both used sanity.json configuration
  • Parts System updates

Studio v2 → v3 (the bigger architectural shift):

  • sanity.jsonsanity.config.js/ts (JavaScript-based config)
  • Parts System completely removed → new plugin API
  • Webpack → Vite build system
  • Full TypeScript support
  • ESM modules required
  • defineType and defineField wrappers for schemas

Based on the community experience, the fastest and cleanest approach is:

  1. Initialize a fresh v3 Studio using npm create sanity@latest
  2. Copy over your schema files to the new project structure
  3. Add your existing project ID and dataset name to sanity.config.js and sanity.cli.js
  4. Update schema syntax to use v3 patterns (mainly adding defineType/defineField wrappers)

If you don't have custom input components or complex plugins, this can take as little as 10-15 minutes!

Schema Considerations

Your schema structure (document types, fields, validation) remains conceptually the same, but the syntax changes slightly:

v2/v1 style:

export default {
  name: 'post',
  type: 'document',
  fields: [...]
}

v3 style:

import {defineType, defineField} from 'sanity'

export default defineType({
  name: 'post',
  type: 'document',
  fields: [...]
})

Important Notes

  • Studio v2 support ended December 7, 2023, so you should prioritize this upgrade
  • The sanity upgrade command doesn't work for major version jumps - that's why you're seeing the 404
  • Your data remains completely safe in the Content Lake throughout this process
  • If you hit dependency issues (like RxJS errors), the fresh install approach typically resolves them

Why the Fresh Install Works Better

Community members found that trying to upgrade in-place often caused dependency conflicts that were hard to resolve. Starting fresh with npm create sanity@latest and migrating your schemas over avoids these issues entirely - the new project gets all the correct dependencies from the start.

Your data is safe, and once you're on v3 (or now v4, which is the current version), the platform is much more stable and modern. The migration effort is worth it!

Show original thread
13 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.

Was this answer helpful?