Changes Made in My Production Studio Aren't Affecting My Website
This is a classic caching issue! Your content changes are making it to Sanity's production dataset just fine (that's why you see them in the production Studio), but your production website isn't picking them up. The fact that manual deploys fix it temporarily is the key clue.
Here's what's likely happening: Your Next.js site is using static generation (SSG) and was previously configured to automatically revalidate when content changed, but that automatic revalidation has stopped working. When you manually redeploy on Vercel, it rebuilds all the static pages with fresh data, which is why you see the changes then.
What to Check
1. Webhook Configuration
If you were using webhooks to trigger on-demand revalidation, check that your webhook is still properly configured in Sanity:
- Go to your Sanity project dashboard → API → Webhooks
- Verify your webhook URL is correct and pointing to your production domain
- Check the webhook logs to see if it's firing successfully
- Make sure the webhook secret (if you're using one) matches what's in your Vercel environment variables
2. Revalidation Settings
If you're using time-based ISR (Incremental Static Regeneration), verify your revalidate values are still set in your data fetching:
export async function getStaticProps() {
const data = await client.fetch(query)
return {
props: { data },
revalidate: 60 // Should have a revalidate value
}
}3. Sanity Client Configuration
Check your Sanity client configuration in your production site. You should have useCdn: false for ISR to work properly, as the Sanity CDN can serve stale cached data that conflicts with Next.js's revalidation:
const client = createClient({
projectId: 'your-project-id',
dataset: 'production',
apiVersion: '2024-01-01',
useCdn: false, // Important for ISR!
})4. Environment Variables
After your node_modules reinstall, double-check that all your environment variables are still correctly set in Vercel (not just locally). Missing or incorrect API tokens could prevent revalidation from working.
The Fix
The most reliable modern approach is to set up on-demand revalidation with webhooks. This triggers revalidation immediately when content changes in Sanity, rather than waiting for time-based intervals.
Alternatively, consider using Sanity Functions (the newer, recommended approach) to handle content change events and trigger revalidation without needing external webhooks or hosting your own API routes.
Since this started after your dependency reinstall, I'd bet something got reset in either your webhook configuration or your Vercel environment variables. Start by checking those two things first!
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.