Website Without PHP
English (United States)US
  • English (United States)
  • Dutch (Netherlands)
Menu

Static site generator

Also known as: SSG, Astro, Hugo

A static site generator, such as Astro or Hugo, is a tool that builds all the pages of a website in advance, so visitors get ready-made files.

Read the explanation

Static sites Last updated:

A static site generator, such as Astro or Hugo, is a tool that builds all the pages of a website in advance, so visitors get ready-made files. Instead of building a page every time a visitor arrives, the generator builds all pages once, and those files are what your host serves.

What is a static site generator?

The generator turns content and templates into plain files on your computer or in a build service, before the site is published.

You give the generator two things: templates that describe the layout, and content, such as text files, data or entries from a headless CMS. It combines them and writes out every page as HTML, together with stylesheets, scripts and images. When the work is done, the output is a folder that you can place on any web host or CDN.

Different generators suit different teams. Some are built around content-heavy sites with many pages and a simple structure, others around component-based design where pages mix static content with small interactive parts. The common idea stays the same: the heavy work happens at build time, not at visit time.

What it means for your PHP site

Which PHP version does your site report?

We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

Your PHP site does its assembly work on the live server, with PHP code and a database. A generator moves that to a build step, so the live server only hands out finished files. The result is a static website with no PHP and no database running when a page is shown.

That means a smaller attack surface and fewer parts that can fall behind on updates, though it does not make a site unhackable, since your hosting account, build pipeline and any third-party scripts still matter.

Your PHP version also stops being a concern for the public site, since nothing PHP runs there. The build tools have their own dependencies, and those need updating now and then, but on your computer or in a build service, not on the server facing visitors.

How to tell if it fits

A generator suits sites where the content is the same for every visitor and changes at a manageable pace: company sites, portfolios, blogs, documentation and landing pages. It suits teams who accept that a change goes through a build. It fits less well when the site must change many times per day or personalize every page.

Check the editing workflow before you decide. Ask who will update the site, how often, and whether they are comfortable with a headless CMS or a text-based approach. A good setup makes publishing a few clicks.

Replacing a WordPress site

The usual route is an inventory of existing pages, a rebuild of the design as templates, a content migration, a test on a staging address and a switch of the domain with redirects. The old WordPress site can stay available during the test, so there is always a way back. Our WordPress to static site service does this work, and our PHP migration service covers a move to another host or stack.

Dynamic extras, such as a contact form or search, are added with small services or serverless functions.

When to act

Act when keeping a PHP site up to date costs more effort than the site is worth, when your PHP version is near the end of support, or when you are about to pay for a redesign anyway. A rebuild with a generator is a good moment to remove what you do not need.

Not sure how this applies to your site?

Ask a person to take a look. We check which PHP version your site runs and whether the fix is in, and tell you the next step.

Ask a person to take a look

Or have PHP updated right away: PHP update from $555 excl. VAT

Frequently asked questions

What is an example of a static site generator?

Astro and Hugo are well-known examples. Each takes your content and templates and produces a folder of HTML, CSS and JavaScript files that you upload to a host.

Do I need to code to use one?

The setup needs a developer. Day-to-day editing does not have to: content can live in a headless CMS or simple text files with an editing screen, so you can change text without touching code.

How does a new page go live?

You change the content, and the generator builds the site again. The new files are then uploaded, usually automatically from a code repository. It often takes a short while, rather than being instant like a live editor.

Can I move my WordPress content over?

Yes. Pages, posts and images can be exported and rebuilt as templates and content files. The design is recreated in the generator, and redirects keep your old URLs working.

Share this page

Ask your AI to explain

Opens the chat with a question about this page. An AI answer can differ; the sources above are leading.

This question is sent along: Summarise the confirmed facts on https://websitewithoutphp.com/en-us/glossary/static-site-generator/ in 5 short points, with the source per point.

  1. Domain
  2. Check
  3. Result
  4. Report

Which PHP version does your site run?

Enter your domain. We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

We keep the domain and the result, never your IP address.