sanity start" showing wrong project on localhost:3333

8 replies
Last updated: Jan 28, 2026
Hi everyone. I'm new to using Sanity and having a bit of an issue with local development, and wondering if someone is able to point me in the right direction.
The issue is that when I run
sanity start
and then open my browser to
<https://localhost:3333>
, it seems to be using a previous Sanity project, and not the project I am running the
sanity start
command from
I have tried disabling the other project, logging in and out of Sanity via the CLI, clearing browser cache, re-installing
@sanity/cli
globally, but still having this issue
Is there something I am missing? How can I clear the unwanted project from my local development?

Thanks in advance for any replies.
AI Update

Based on the documentation and a similar case in the Sanity community, this appears to be a port conflict issue rather than a browser cache or service worker problem with Sanity Studio.

First, verify your project configuration:

Check your sanity.config.ts (or sanity.config.js) file to confirm it has the correct projectId and dataset specified in the configuration:

import { defineConfig } from 'sanity'

export default defineConfig({
  projectId: 'your-project-id',
  dataset: 'production',
  // ... other config
})

You can also check your sanity.cli.ts file to ensure the API configuration is correct:

import { defineCliConfig } from 'sanity/cli'

export default defineCliConfig({
  api: {
    projectId: 'your-project-id',
    dataset: 'production'
  }
})

Kill any processes using port 3333:

The most likely cause is that another process is running on port 3333 and serving content from your old project. You'll need to terminate it:

  • macOS/Linux: Run lsof -ti :3333 | xargs kill -9 in your terminal
  • Windows: Use netstat -ano | findstr :3333 to find the process ID, then taskkill /PID <process-id> /F

Try a different port:

As a quick workaround, you can run your Studio on a different port using:

sanity start --port=3334

Or configure it permanently in your sanity.cli.ts:

import { defineCliConfig } from 'sanity/cli'

export default defineCliConfig({
  api: {
    projectId: 'your-project-id',
    dataset: 'production'
  },
  server: {
    port: 3334
  }
})

Restart your machine:

In a similar reported case, the issue was resolved by restarting the machine, which cleared a stray process running the old project on the same port.

The issue you're experiencing is most likely a port conflict where another process is serving content on localhost:3333, rather than a browser or Sanity Studio caching issue. The steps above should help you identify and resolve the conflict.

Show original thread
8 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?