Why Build a Headless CMS Website with WordPress or Drupal?
Drupal is a go-to solution when an enterprise, open source Content Management System (CMS) is called for. WordPress is familiar to many site owners as a CMS adopted by 31% of CMS-powered websites in 20201, though it’s still beholden to its roots as a blogging platform. We’ve always preferred Craft CMS (and ExpressionEngine prior to Craft’s debut) for its flexibility, extensibility, security, and approach to templating. But a new approach to building websites—the headless CMS model—has us reconsidering Drupal or WordPress if requirements or your team’s experience favor those products.
What’s a Headless CMS?
The Jamstack is gaining steam as a modern approach to building, serving, and maintaining performant, secure, and reliable websites. The “JAM” in Jamstack stands for JavaScript, APIs, and Markup, with a goal of breaking the website that runs in a browser free from a database or filesystem-powered CMS running on a single server. Jamstack sites can still use content management tools, but instead of merging content & templates when the page is requested, they undergo a build process when content is updated, generating a static website consisting of HTML, CSS, JavaScript, and media files, distributed across a Content Delivery Network (CDN). The generated site is fast, secure, and immune to server downtime issues. Some sites may leverage Application Programming Interfaces (APIs) to fetch dynamic content or provide additional functionality.
In the headless—or decoupled—CMS model, the generated website pulls content from a traditional CMS—WordPress, Drupal, Craft—during an automated build (and the CMS can be configured to trigger the build process whenever content is updated). The resulting static site is independent of the CMS and its rendering system, thus the CMS is “headless.” Headless CMS sites continue to rely on a robust authoring experience while not relying on the CMS to render pages in real time.
Why go this route?
Better Security
Staying up to date with CMS updates and security patches will always be a concern, but a CMS decoupled from your public website domain is a significantly reduced vulnerability. A static, generated site is only deployed to the CDN after a successful build, and there’s no control panel running at its URL.
We’ve long been more comfortable with Craft’s track record for security than WordPress or Drupal’s, both of which are, admittedly, targeted victims of their own success. But by isolating a headless CMS from the live site, we can eliminate the website’s URL as an attack vector on any CMS platform.
Increased Uptime & Reliability
Ever drop a press release only to watch your site falter under a surge of unexpected traffic? We don’t like getting those calls, either.
Here we’re not configuring complex caching schemes or upgrading servers to keep up with traffic spikes or aid performance. The Jamstack takes care of that for us. A static, generated site will perform as well for 10 users as 1,000,000, with no intervention required.
And with a static, generated site deployed to the edges of a global content delivery network, headless CMS builds deliver better uptime and faster performance, critical factors for Search Engine Optimization (SEO) and the User Experience (UX).
Clear(er) Separation of Concerns
WordPress & Drupal are both theme-based. The tight coupling of their control panel tools and templates tends to dictate not only how we code page layouts, but also the scope of what we code. Page-building tools that often end up underutilized lead to over-engineered layout code, and firms invest time creating their own starter themes or reverse-engineering existing themes.
Page and module layouts belong in code-based template files—not bound to, or generated by, CMS control panels. A CMS should be a tool to enable adding, editing, and refining content, including media—not a design tool. (Selectively using CMS fields to configure design elements is acceptable.) We prefer to have those template files start off as a platform-agnostic blank slate, unencumbered by theme constraints, so that a skilled front-end developer can get to work rendering designs for review, focusing on accessible and search-optimized markup. With Craft CMS we’d then update those templates or components with field references and template logic—the same approach we can take with a static site generator like Eleventy or Gatsby. In a headless CMS site build, our front-end developer is empowered to focus on mastery of their concerns, not multiple monolithic content management systems.
A More Sustainable Web
It’s our hope that static, generated websites will reduce the computing power otherwise required to serve sites dependent on databases and application code for every page request, thereby reducing the energy consumed by so many data centers. Shifting from fossil fuels to renewable energy isn’t enough. We should aspire to be mindful of unnecessary or wasteful energy usage in every form.
Ready to Go Headless?
Jamstack sites don’t need to rely on a traditional CMS in headless mode. They can be updated infrequently by your development team, or utilize other content management tools to edit content files and trigger a new build. For those accustomed to the authoring experience afforded by a traditional CMS—with granular editor permissions, media management, publishing workflows, and other functionality—a headless CMS implementation provides the best of both worlds: a secure, performant, reliable static site backed by powerful content management tools.
Ready to get started? Contact Clearbold today.