Skip to content

Put your site online

WPTom templates are set up for Vercel: it builds your site from GitHub and republishes it on every change. The free Hobby plan is enough for personal sites; Vercel’s terms ask for the Pro plan for commercial use. This takes about 15 minutes the first time.

Using the EmDash variant? It runs on Cloudflare instead: see EmDash → Deploy to Cloudflare.

GitHub stores your project online; Vercel reads it from there.

  1. Sign in at github.com (create a free account if you need one).

  2. Click + (top right) → New repository.

  3. Name it (e.g. my-site), choose Private, and leave “Add a README” and the other boxes unticked (your project has them already). Click Create repository.

  4. GitHub shows a page with commands. In your project folder, run (with your own address from that page):

    Terminal window
    git add .
    git commit -m "My site"
    git branch -M main
    git remote add origin https://github.com/your-name/my-site.git
    git push -u origin main

    The first push may ask you to sign in to GitHub in the browser.

Reload the GitHub page: your files are there. Check that .env is not among them (it never should be; .gitignore keeps it out).

  1. Go to vercel.com and Sign Up with Continue with GitHub.
  2. Click Add New… → Project.
  3. Find your repository in the list and click Import (if it’s missing, click Adjust GitHub App Permissions and allow access to it).
  4. Vercel recognises Astro by itself. Leave Build Command and Output Directory as they are.
  5. Open Environment Variables and add the keys from your .env that you use (name and value, one by one; Vercel also lets you paste the whole .env content). See Turn on the features. You can add them later too.
  6. Click Deploy. A minute later you get an address like my-site.vercel.app. Open it: your site is live.
  1. In Vercel: your project → Settings → Domains → enter example.com → Add.
  2. Vercel shows the DNS records to create (usually an A record for example.com and a CNAME for www). Add them where you bought the domain (its “DNS” settings).
  3. Wait until Vercel shows a green check (minutes, sometimes a few hours). HTTPS is set up automatically.
  4. Tell the site its address: in astro.config.mjs, set const site = 'https://example.com'. It’s used for links in search results, the sitemap and social previews. Commit and push.

Every push to main publishes the site again:

Terminal window
git add .
git commit -m "New pricing"
git push

Vercel builds it and switches over when it’s ready (about a minute). If a build fails, the old version stays online and Vercel shows the error under Deployments; most often a required field is empty: run npm run build on your computer to see the same message.

The content editor runs on your computer by default. To let you (or a client) edit on the live site at /keystatic, connect it to GitHub: every save becomes a commit and Vercel republishes. Steps: Keystatic → Editing on the live site. Prefer a hosted CMS? Sanity.

The pages are static, so Netlify, Cloudflare Pages and others work too. The parts that run on the server (waitlist, checkout, chat) need the host’s Astro adapter instead of @astrojs/vercel: follow Astro’s deployment guides and change the adapter in variant.config.mjs.