All Guides
Delivery Intermediate March 14, 2026 15 min read

How to Deploy Your Sanity Template

Step-by-step guide to take your purchased Sanity-powered template from download to fully live — including Studio setup, environment variables, Vercel deployment, and content population.

So you just purchased a Sanity-powered template. Here is the full process to get it running on a real domain, step by step.

Looking for a static template guide? If your template does not use Sanity, see How to Deploy Your Static Template — it covers Vercel, Netlify, and GitHub Pages.


What You Get

When you purchase a Sanity template from FSEVO, you receive access to a private GitHub repository that contains:

  • The Astro frontend (fully built, production-ready)
  • A /studio folder with the pre-configured Sanity Studio
  • Environment variable template (.env.example)
  • This guide

Step 1 — Get Repository Access

After purchase, you will receive an email with a GitHub collaborator invite. Accept the invite and then clone the repo to your machine:

git clone https://github.com/fsevo/your-template-name
cd your-template-name
npm install

If you do not receive the invite within 10 minutes, check your spam folder or email fullstackevolved@gmail.com with your order confirmation.


Step 2 — Create Your Sanity Project

Go to sanity.io/manage and sign in (create a free account if needed).

  1. Click Create new project
  2. Give it a name (e.g. your domain name)
  3. Choose Free plan — it is more than enough
  4. Note your Project ID — you will need it shortly
  5. Your dataset is named production by default

You now have an empty Sanity backend ready to receive content.


Step 3 — Configure Environment Variables

In the root of the project, duplicate .env.example and rename it .env:

cp .env.example .env

Open .env and fill in your values:

PUBLIC_SANITY_PROJECT_ID=your_project_id_here
PUBLIC_SANITY_DATASET=production

That is all you need locally. The frontend reads from Sanity’s public CDN, so no API tokens are required for the read-only frontend.


Step 4 — Deploy Sanity Studio

The /studio folder is a standalone Sanity Studio app. Deploy it to Sanity’s free hosting:

cd studio
npx sanity deploy

When prompted, choose a hostname — this becomes your Studio URL:

https://your-studio-name.sanity.studio

Bookmark this URL. You will use it to manage all your site content.


Step 5 — Populate Your Content

Open your Studio URL in the browser and start adding content.

The schema is pre-built to match the frontend exactly. Every field maps directly to what you see on the live site. A few tips:

  • Images — upload to Sanity’s media library; they are served via Sanity’s global CDN automatically
  • Rich text — use the block editor; headers, links, and lists are all styled on the frontend
  • Slugs — click “Generate” next to the slug field; do not type these manually
  • Drafts — content stays in draft until you hit “Publish”; the live site will not show it

Start with the most important page (usually the homepage hero and about section) and work outward.


Vercel is our recommended platform for all FSEVO templates — best Astro support, zero-config, and free tier is more than enough for most projects.

Go to vercel.com, sign in, and click Add New Project.

  1. Import the GitHub repository you cloned in Step 1
  2. Vercel auto-detects Astro — the build settings are correct by default
  3. Before deploying, go to Environment Variables and add:
    • PUBLIC_SANITY_PROJECT_ID → your project ID
    • PUBLIC_SANITY_DATASETproduction
  4. Click Deploy

Your site will be live at your-project.vercel.app in about 60 seconds.


Step 7 — Connect a Custom Domain

In your Vercel project, go to Settings → Domains and add your domain.

Vercel will show you the DNS records to add. Go to your domain registrar (Namecheap, Cloudflare, GoDaddy, etc.) and add:

  • An A record pointing to Vercel’s IP: 76.76.21.21
  • Or a CNAME pointing to cname.vercel-dns.com (for subdomains)

DNS propagation takes between 1 minute and 24 hours depending on your registrar. Vercel handles HTTPS automatically — no SSL configuration needed.


By default, the frontend rebuilds on every Vercel deploy. To trigger a rebuild automatically when you publish content in Sanity:

  1. In Vercel, go to Settings → Git → Deploy Hooks and create a hook — copy the URL
  2. In Sanity Studio, install the Vercel Deploy plugin:
cd studio
npx sanity install @sanity/vercel-deploy
  1. Add the hook URL to your Studio config

Now every time you hit “Publish” in Sanity, the frontend rebuilds automatically — no manual deploys needed.


Troubleshooting

Content not showing on the live site Make sure you hit Publish in Sanity Studio. Draft content is never sent to the frontend.

Build fails on Vercel Check that your environment variables are set correctly in the Vercel dashboard. A missing PUBLIC_SANITY_PROJECT_ID is the most common cause.

Images not loading Your Sanity project ID must match exactly in .env. Double-check the value in sanity.io/manage.

Studio shows “Unauthorized” Go to sanity.io/manage → your project → API → CORS Origins and add your Studio URL and your live domain.


Need Help?

If you run into anything not covered here, email fullstackevolved@gmail.com with your order reference and a description of the issue. Response time is under 24 hours.

sanity deployment vercel astro setup