Is it time you switched to Headless WordPress?

Insights7 min read

WordPress has always been a great choice for building easy-to-manage, maintainable websites that are content-heavy and sport the latest features. With its diverse ecosystem of premium themes and plugins, it doesn't take much to get a site up and running that's fit-for-purpose.

However, for growing brands who require agility and (understandably) resent compromise, there often comes a point where WordPress starts to crack. We work with many brands (and find that those using WordPress are commonly operating in D2C markets) that have long experienced slowness and inefficiencies which eventually grind the WP experience to a halt.

If you're struggling with persistent slowness and are finding things challenging to optimize or maintain, it might be time to consider going headless.

The other primary reason you might consider this is where you're experiencing barriers to implementing particularly complex or specialized functionality that you're unable to derive from premium plugins, or—as the case may be—efficiently through custom development.

What is headless WordPress?

Before deciding if or when you should make the switch, it's important to have a solid understanding of what headless WP really means, and what the process involves.

When devs speak of Headless WordPress, we're referring to a situation whereby we essentially split your WordPress installation in half. Not literally, but figuratively. You'll keep the backend (the WP admin), and continue to manage your content in the same way as you've always done. But your frontend will no longer be WP's responsibility. The content of your WP site will be consumed by a separate frontend, through a series of APIs, and displayed (rendered) by the external frontend. This process is commonly referred to as "decoupling" WordPress, in the sense that we decouple the frontend from the backend.  The APIs that are used will be either JSON or GraphQL, but the idea is the same: to facilitate the transfer of data between two separate applications: your WP backend and your "external" frontend. The "externality" of the frontend is where the real gains happen.

The front-end will typically be built out using one of today's best-of-breed frontend Javascript frameworks, such as Next.js, Remix, Astro, Gatsby, or Nuxt (... and the list goes on). These frameworks are best-of-breed because they facilitate the creation of advanced user experiences that significantly surpass what is feasibly possible using monolithic all-in-one platforms like WP. They're hyper-performant, permit complex rendering and fancy effects while simultaneously ensuring load times are kept low, and support more agile and stable ongoing development.

AKA, you get more control. 

And with that, you're probably likely to want to start capitalizing on all the user experience gains that are now possible, through redeveloping the frontend to deliver an experience as succinct as your user journey demands. 

There are other benefits, such as increased security, as oftentimes it's entirely possible to obscure the WordPress installation from the JavaScript frontend entirely, preventing any kind of direct access to WordPress from the client side.

Signs that indicate it might be time to consider a switch to headless WordPress

Here are a few signs that tell you that it is high time to switch to headless WordPress over non-headless WordPress.

1. You're struggling with page response time and slow load speeds

Page response time is one of the primary factors in website performance. All the stats strongly suggest that users (and yes, even internet crawlers) don't like to wait for more than a couple of seconds for a page to load. 2 seconds is really your limit, before you'll start seeing drop off.

Even if you don't care about the positive impact site performance makes on user's impressions of your brand, your wallet definitely will.

Maintaining a slow site is akin to leaving money on the table. Users will drop off and go elsewhere. With traditional WordPress sites frequently pumped with plugins and bloated code modifications over the years (we bet you're guilty), you're gonna have a hard time slimming down page size to boost the site's performance profile, while simultaneously maintaining all existing functionality. Headless is a really good fit here, as the progressiveness of these stacks enable the rich experiences imperative to your customer journey whilst delivering on speed.

2. It is best if you desire complex customization.

There's a place for WordPress (many, good places!), but complex and highly-custom functionality is not one of them. If a straightforward brochure site encapsulates your brands needs, bog-standard WP is one of the best ways forward.

On the other hand, demanding ecommerce stores, complex marketplaces and sites featuring large amounts of user generated content and interaction are not going to fare well indefinitely. The plugins and custom code required to build and power these kind of implementations are, almost guaranteed, going to cause performance, management, and operational concern with time.

3. A high level of dependency on plugins

Attempting to introduce high levels of complex functionality to WordPress increases your site's dependence on plugins, which is in fact the opposite of where you want to be. 

With each additional plugin, the application becomes further open to potential security vulnerabilities through unvetted code and integrations. 

Plugins can suffer interoperability issues as a result of upgrades, and your core WP installation's upgrade status is going to heavily depend on the availability of updated plugin versions.

Let's Talk Headless WP

Don't do it!

One of the (often unintended) consequences of headless builds is that they serve to protect your backend from high levels of vulnerability. 

Progressive frontend frameworks such as Next.js operate their own server-side environment within the application, which is able to facilitate a connection to the backend (WP in this case) without direct exposure to the client side. 

In other words, even when users conduct actions from the headless frontend that involve or require a connection to WordPress, the client (the end user and their computer/network) don't actually "see" WordPress directly; the connection happens all within the Next.js server. 

This provides options to handle and sanitize whatever data is being sent even before it reaches WordPress, and obscures the WordPress backend entirely from the site frontend.

Benefits of Switching to Headless WordPress

Still need convincing? Let’s take a look at some of the significant benefits you can enjoy by going headless with WordPress.

1. Better Brand Experience, Better Developer Experience

Web technology has changed significantly over the last five to ten years. With the introduction of React, along with many subsequent Javascript-based frameworks and static site generators, frontend development is today in a very different place than not more than a few years ago.

WordPress has, like several other older content management systems, remained fairly stagnant in its adaptation and evolution to these new technologies. In spite of its continued development and consistent releases, the CMS hasn't evolved much in terms of how it delivers experiences. Yes, Gutenberg was a massive leap for the CMS, and its strong ecosystem of plugins and page building tools (hello, Elementor!) promise an improved content authorship experience, but it's still behind.

For brands looking to truly disrupt, this poses a significant obstacle. Young, open-minded developers are eager to explore and engage with a rapidly expanding toolset of progressive web development technologies and have pivoted direction. Just look at Kyle Matthews, founder of GatsbyJS (since sold to Netlify), who was previously developing with Drupal.

Talent is moving in the direction of data-first, headless architectures, leaving a lackluster pool of talent remaining with jQuery and the likes of Gutenberg blocks.  We find that brands who desire compelling, emotion-evoking online experiences are equally conflicted, and more frequently looking toward JavaScript as the core frontend technology of choice in order to strongly deliver.

Headless WordPress helps to bridge this gap, for brands who find the development freedom of WordPress core more than sufficient. With the best of both worlds – WordPress serving dutifully as a stable content hub – and a progressive frontend framework taking the reigns on user experience delivery, headless WordPress is the golden goose that keeps on giving.

2. Publish everywhere

Once we start to decouple WordPress, what becomes clear is that the content merely exists as data. Those WordPress REST APIs were always there, but now we're starting to use them.

It's more of a mindset shift than an increase in tooling, but this means that your brand is more primed for distribution of content multilaterally, in various different directions.

Start streaming the same content to multiple sites under your brand umbrella, social media sites, online marketplaces and distributional channels, and elsewhere.

3. Provides for better site security

Headless WP fares much better in terms of vulnerability potential when compared to a traditional WordPress setup, plain & simply because the backend is not on-show. 

The WP frontend won't be on-show either, so attackers are unlikely to identify a direct entry point by simply browsing (or even probing) a headless frontend. 

The modern JS frontend frameworks will do a pretty good job of obscuring the WordPress installation, simply because they'll connect to it via a middleware or built-in server-side environment. This isn't always the case, and will depend on which framework you're using and precisely how it's implemented (React's useEffect is not going to be obscuring network requests to the WordPress backend from showing up under the Network tab), but it's easy to do.

4. Budget-friendly 

Another key benefit of headless WordPress is that it's comparatively affordable when pinned up against proprietary headless CMS. 

Contentful and Sanity are good examples of this, requiring monthly subscriptions in order to maintain access to their respective platforms. 

While both (and there are many others, such as Strapi Cloud, Hygraph, and Cosmic) are great platforms, their proprietary nature is not going to work in every case, not least when a high degree of backend customization (not referring to architecture customization here) is required.

WordPress is providing a hub for all your content for a potentially lower cost, in particular if you have a fair number of content contributors (many of the big headless CMS run restrictions on team size with their cheaper plans).

We're the experts in Headless.

Let's talk.

About Cocoon

Founded in 2015, we're an experience design and software development agency that leverages modern technologies to deliver impactful results for disruptive brands.

Most agencies are built on the idea of a single solution. That's where we're different. We're inherently platform-agnostic, and believe in the selection of best-fit technologies according to business requirements and end-user goals.

More about us

Discuss a Project.

We build modern digital experiences for disruptive brands.

Tell us about your project, and we’ll get back to you with details on how we can make this happen.