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.
1. Put your project on GitHub
Section titled “1. Put your project on GitHub”GitHub stores your project online; Vercel reads it from there.
-
Sign in at github.com (create a free account if you need one).
-
Click + (top right) → New repository.
-
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. -
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 maingit remote add origin https://github.com/your-name/my-site.gitgit push -u origin mainThe 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).
2. Create the site on Vercel
Section titled “2. Create the site on Vercel”- Go to vercel.com and Sign Up with Continue with GitHub.
- Click Add New… → Project.
- Find your repository in the list and click Import (if it’s missing, click Adjust GitHub App Permissions and allow access to it).
- Vercel recognises Astro by itself. Leave Build Command and Output Directory as they are.
- Open Environment Variables and add the keys from your
.envthat you use (name and value, one by one; Vercel also lets you paste the whole.envcontent). See Turn on the features. You can add them later too. - Click Deploy. A minute later you get an address like
my-site.vercel.app. Open it: your site is live.
3. Your own domain
Section titled “3. Your own domain”- In Vercel: your project → Settings → Domains → enter
example.com→ Add. - Vercel shows the DNS records to create (usually an
Arecord forexample.comand aCNAMEforwww). Add them where you bought the domain (its “DNS” settings). - Wait until Vercel shows a green check (minutes, sometimes a few hours). HTTPS is set up automatically.
- Tell the site its address: in
astro.config.mjs, setconst site = 'https://example.com'. It’s used for links in search results, the sitemap and social previews. Commit and push.
4. Publish changes
Section titled “4. Publish changes”Every push to main publishes the site again:
git add .git commit -m "New pricing"git pushVercel 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.
Editing on the live site
Section titled “Editing on the live site”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.
Other hosts
Section titled “Other hosts”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.