Skip to main content

New series: how one WordPress checkbox cost a site 7 months of Google traffic, and the full rescue in 21 lessons. Read the series

Glossary term

static site generation

Updated Nov 19, 2026

In short

A build-time approach where a framework or generator turns templates and content into finished HTML pages ahead of time, so the server only hands out ready-made files.

Static site generation is the practice of building pages in advance instead of when a visitor asks for them. A generator or framework takes templates plus content, which may come from Markdown files, a database or a CMS, and produces finished HTML files during a build step. Those files are then uploaded to a host or content delivery network and served as they are.

The benefit is that the expensive work happens once. There is no database query or template rendering on each request, so pages are typically fast, cheap to serve and have little server-side code for an attacker to target. Many frameworks, including Next.js, let you choose this per page, mixing pre-built pages with ones rendered on demand.

The cost is that content changes only appear after a rebuild. Small sites rebuild in seconds, but a site with tens of thousands of pages can take a long time. Frameworks offer ways around this, such as rebuilding only changed pages or refreshing a page after a set interval. Scheduled content, for example, needs something to trigger a rebuild at the right moment, often a cron job or a webhook from the CMS.

A common confusion is that static means no dynamic features. Forms, search, comments and logged-in areas can still work through browser JavaScript and outside services. Another is thinking it replaces every optimization: images and scripts still need care. Platforms such as Vercel automate the build and deploy, and the approach removes much of the work a caching plugin does on a traditional CMS.

An example: a blog with 300 articles is built in one pass on every deploy, and visitors receive ready-made files.

Related: Vercel, cron job, caching plugin, shared hosting