Platforms

WordPress vs Static Site Generators

How a sites managed by a Content Management System compare against those built by a Static Site Generator.

9 minute read Platforms Craig Buckler

In the world of web content publishing, you typically have two choices:

  • a Content Management System (CMS), or
  • a Static Site Generator (SSG).

This article will help you decide which is best for your site.

What is a Content Management System?

58% of sites use a CMS. WordPress is the most popular option accounting for more than 64% of those. WordPress powers more than 40% of the web (source: HTTP Archive Web Almanac).

A CMS typically provides administrative control panels and theming capabilities in a single software package. It allows authors to configure a website and edit content stored in a backend database.

When a visitor requests a URL, the CMS:

  1. analyses the request to determine what to return
  2. fetches appropriate content from the database
  3. loads a page layout template (usually from the file system)
  4. renders the content data within the template, and
  5. returns a formatted HTML page to the visitor's browser.

The process occurs almost instantly, especially when you enable caching.

What is a Static Site Generator?

An SSG generates a set of HTML pages using data from any source. Markdown files are often used, but you can opt for a "headless" or "decoupled" CMS that serves content via an API.

Like WordPress, an SSG uses page layout templates but the build process occurs once -- perhaps after a content change. When a visitor requests a URL, a web server returns a static HTML file: there's no need for a runtime language, database, or server-side functionality. However, you should consider having a staging area to review changes before you push live.

The term "static" does not mean "unchanging". An SSG builds a page once, while a CMS builds it on each request. The end result could be identical to end users.

The following sections compare CMS and SSG concepts to help you decide which is best for your website.

Choosing an application

You can choose from dozens of CMSes, but the easy option is WordPress. It's free and powers more than 40% of the web so assistance and resources are plentiful. It's easy to try other options if WordPress isn't the right fit -- most CMSes provide online demonstrations or free downloads for evaluation.

Even more SSGs are available -- Jamstack.org lists 377 for all runtimes, template types, and licences. I recommend choosing a runtime you know, but dozens of options can lead to choice paralysis. Evaluating an option incurs significant research and development time. You may also need to evaluate a CMS for content.

Winner: CMS. WordPress is the obvious choice unless you have specific requirements.

Ease of getting started

WordPress claims to have a "famous five-minute install" process and it's true you could publish a site using a default template in that time. However, this assumes your system already has a pre-configured web server, recent edition of PHP, a MySQL or MariaDB database, and appropriate access rights.

Even if an SSG provides themes, you must install an appropriate language runtime and create a build process. You may also need to install a CMS to manage content. You're on your own and won't get far without development expertise.

Winner: CMS. It's far easier to get going.

Developer input requirements

Plenty of hosts provide pre-configured installations, so it's possible for someone with minimal technical knowledge to manage a successful WordPress blog.

An SSG is a development tool. An AI can help, but you require someone with good development skills to create and manage the build process.

Winner: CMS. Site owners often manage sites without developers.

Development costs

Even if you require a WordPress developer, there are plenty around and they won't need to implement basic functionality that's already available in the core code or plugins.

SSG development costs are higher up-front because someone must create the build process and templates.

Winner: CMS. That said, an SSG may have lower ongoing maintenance costs because there are fewer dependencies and security issues to manage.

Functionality

Most CMSes offer basic editing functionality but you can extend them with custom themes and plugins. WordPress has over 73,000 options and you can change a blog into a full online shop, social network, video viewer, or anything you desire.

SSGs can also offer themes and plugins but they are more limited. Adding server-side functionality will not be as straight-forward as a CMS.

Winner: CMS. You can extend most using themes and plugins.

Flexibility

You can add CMS or SSG features with your own custom code or plugins:

  • A CMS may purposely tie you to specific database fields and ways of working, but you can write client or server code to add flexibility.
  • An SSG has no such constraints, although server-side functionality may add some complications.

Winner: draw.

User account considerations

CMSes such as WordPress offer user accounts with levels of editing and publishing control.

If an SSG uses a CMS for content management, it will also provide user accounts but that CMS need not be public-facing. Developer permissions are also necessary to pull the template code and build the site.

Winner: SSG. It offers more possibilities for controlling user access.

Site size considerations

A CMS-driven site can be of any size -- your only constraint is disk and database space.

A typical SSG must build every page of the site before you can view it. The larger your site, the longer the build process takes. That said, it's possible to render thousands of pages within seconds.

Winner: a draw for most sites. A CMS would possibly win on a site with tens of thousands of pages but, at that point, you may require a more bespoke application.

Publishing speed

Publishing a CMS-controlled page is instant. It's generally a matter of hitting "publish" so a user can view that page when they request it.

Most SSGs require a process to trigger a build, deploy to staging, approve the update, and push live. This takes time and may be impractical on rapidly-changing news websites.

Winner: CMS. Publish without delay.

Version control

WordPress allows you to revert to previous revisions of a post, but a full back-up is more onerous. You must copy the CMS, plugin, and theme code as well as the database. This can lead to complications when developers are working on different versions of the site with different content, plugins, and configurations.

If you're using markdown files, your whole SSG-driven site can be version controlled using Git or similar. Even if you use a CMS, it's decoupled from the build and is not managing site functionality.

Winner: SSG. It's easier to have a full back-up of your site with every revision ever made.

Site performance

Even with pre-cached pages, most CMSes run server-side functionality to check the URL, query the database, and return an HTML response.

SSG sites are pre-built. With no server-side processing, an identical static site will always load faster than one controlled by a CMS.

Winner: SSG. Zero processing and zero overhead.

Site reliability

CMSes such as WordPress are large, complex applications. Most require:

  1. a suitable Operating System
  2. a web server such as Apache or NGINX
  3. PHP with associated extensions and configurations
  4. a MySQL or MariaDB database
  5. the WordPress application
  6. any necessary plugins
  7. the theme/template code.

If any fail, your site fails. You've almost certainly encountered the WordPress "Error Establishing a Database Connection".

The SSG build process could require just as many dependencies but it can run anywhere without affecting the live site. You can host the generated client-side HTML files and associated assets on any web server.

Winner: SSG. Little can go wrong on your live site.

Site security

A CMS and WordPress in particular are significant hacking targets. The most obvious entry point is the user login screen: it's only as secure as the weakest password. Vulnerabilities may also exist in the WordPress core, plugin, or theme code.

It may not be obvious when someone gains access to your CMS. The worst culprits stay hidden and use your site for traffic hijacking, rogue advertising, SEO linking, and malware hosting.

A static site contains HTML files and associated client-side assets. Even if someone could access, any page changes they made would disappear on the next build.

Winner: SSG. There's little to hack.

Hosting costs

All CMS software requires a language runtime and most use a database. WordPress hosting is often inexpensive, but there is an ongoing cost.

With an SSG, you can build the site and deploy anywhere. There are no server-side requirements so hosting is as inexpensive as it can be -- possibly free. However, you may also require a CMS and the build pipeline has to run somewhere.

Winner: draw. An SSG has fewer direct hosting dependencies but content management and deployment will have costs.

Client handover

There's a myth that anyone can use a CMS. Unfortunately, the applications offer a bewildering range of dangerous options and it's easy to trash a lovingly-crafted WordPress site. You can lock-down rights, but it won't prevent an editor changing fonts, adding clashing colors, using a poor-quality image, or breaking the layout.

A static site can be as limited or as flexible as you choose. Restricting content to markdown files prevents styling mistakes. Even if you're using a CMS to control content, it's decoupled from the build process so you can clean data before page generation.

Winner: SSG. There are fewer opportunities to break a site and version control makes it easier to revert back.

Switching systems

Migrating from one CMS to another involves:

  1. migrating the data to a different format and possibly a different database
  2. ensuring there are equivalent essential plugins, and
  3. choosing a new theme or implementing the current theme in new templates.

There's less need to switch to a different SSG because it's a developer tool. If you must do it, the build system and templates require significant work even if the content can remain in its current location.

Winner: draw. Never under-estimate the complexites of migrating systems!

The winner

The final scores:

  • Content Management Systems: 6
  • Static Site Generators: 6
  • draw: 4

There's no outright winner. As always: your choice depends on what you need to do.

A CMS may be practical when ease of publication, frequency of posting, and features such as shopping carts are essential. A CMS is an end-user application: it's often easy to get started and you can hire a developer later.

An SSG can be preferable when speed, security, and uptime are essential. SSGs are developer tools: they require programming expertise.

Can you have the benefits of both?

It's possible to have a secure CMS with instant static publication of high-performance pages. Please contact us to discuss your requirements.

Ready to build?

Have something complicated to build?

Tell us what you are trying to achieve, not just which page template you think you need. Whether it is a bespoke web application, a complex ecommerce build, or ongoing development support — we will tell you honestly how we can help.