Why Bother with Headless WordPress?

author
Kevin Cunningham
    Posted in

Is Headless WordPress just adding complexity for the sake of it? Is it an excuse for development teams to play with the newest toys? Or does it actually benefit users and deliver real value?

When used in the right situations, a Headless WordPress architecture can improve your users' lives and your content creation team.

At least two audiences with very different needs for every website: the content creators and the content consumers.

For your personal website, you're likely to be the only creator. That's likely to be different for client sites, though. There may be several (or several thousand) authors and editors. Each of these users is possibly tweaking copy and checking on statistics.

Then, your website visitors are visiting and consuming the content—a completely different group of people with other needs and desires.

Traditionally, we've built a single, large application that handles both of these audiences' daily tasks. This is sometimes referred to as a monolithic application. With a headless or decoupled approach, we separate these concerns. We don't try to provide for creation and consumption in a single application. Instead, we create the content in one system and provide a way (or API) to use this content in another system.

We call the tool we use to create, edit and publish our content a Content Management System or CMS. What do we want to do with this tool? Here are some examples:

  • the ability to add, edit, curate, and comment on content;
  • the ability to check on statistics and SEO;
  • the ability to have a variety of user roles and responsibilities;
  • a predictable way to query our data.

With all these in place, we can create exciting and engaging user experiences.

With this separation of content management and the content display, we gain the freedom to experiment. We can try out different ways to display our content and test how we can use it on various platforms, whether that's a new device or a micro-site using only some of your content in different ways.

The market for Headless CMSs has boomed over the past few years. The Headless WordPress ecosystem has been growing as well. With tools like WPGraphQL and the Gutenberg editor, WordPress is a great CMS choice.

Is it too much effort to use WordPress as headless CMS when there are ready made alternatives available?

Use another headless solution

Search for "headless CMS," and you will be presented with lots of different options. I've used several of these products and generally had positive experiences for simple use cases. It doesn't take long before you start hitting the edges of these products, particularly the free tiers.

Let's look at three areas that I think highlight the strengths of WordPress.

The content creation experience

You've probably heard the often quoted statistic that WordPress powers more than 39% of the internet. These same surveys often have tools like React and Vue below 20%. I don't know how accurate these statistics are. I do know that non-technical creators find the WordPress interface understandable. They are confident in blogging or managing an online store using WordPress.

While you are building a site for a client, you're often thinking about the final result. The design and functionality that your users will enjoy are top of mind. Some elements can slip down the priority list. The experience for creating new content or updating the current copy, maybe. Or opportunities to quickly change the site without the need for a developer. In other words, the content management system.

A good CMS is a strong ally in creating excellent content. This could be providing SEO insight during the creation process or helping link to other related content.

WordPress is flexible and adaptable and can be your friend here. It has an intuitive block based editor called Gutenberg that makes creating beautiful content even more manageable. It is familiar to non-technical partners and has well supported optimizations for SEO. It can create multiple users with distinct user roles and responsibilities. You can allow only editors to publish content and pass drafts back-and-forward between editors and authors. You can use WordPress to create the editing workflow that works best along with your content creation team.

The API

WordPress developers have been working on the API for years. A robust plugin and theme ecosystem allows you to lean on the community's experience and expertise. You have complete control over the API and can adapt it to fit your team entirely. By default, WordPress comes with a RESTful API, and with a single plugin, you can have a GraphQL API to serve your content (thank you, Jason Bahl, and team).

Not only can you change your API as you want to, you can also keep it the same and evolve it at your own pace. You don't have to keep pace with a 3rd party as they develop their product.

Also, rather than responding to another developer's API choices, you can alter the API to best suit your use case.

For 80% of your project, a paid CMS product is likely to slide into place easily. We all know that there is that pesky 20% that is bespoke and particular to your project. With a paid CMS, it can be hard to get this granular control and configuration. WordPress developers have been making the software dance to their desires for years. It is possible to craft the API to meet your needs exactly rather than get close.

Cost

WordPress is a free and open-source piece of software. The costs you incur are around the hosting of the CMS and backups of your data. You can host on AWS for a few dollars a month or use a specialized service for this. If you are building a static site from this content, you will likely only need the basic tier, though. This is true even if your website visitors approach millions per day. That's pretty exciting!

If you're looking at the cost for a non-WordPress solution, each of the paid CMS solutions has a different revenue model. If your use case is small and straight-forward, you may be able to use their free tiers.

Some of the headless CMS charge by the number of accounts or the variety of user roles. With WordPress, you can create as many accounts as you want. You can also have users' roles with granular permissions and responsibilities.

Others charge by the content type or volume. With WordPress, you can have many different types of content (Custom Post Types). Each of these can be related and requested together or separately.

Still, others charge for API usage. That's true for some of the WordPress hosting companies as well. You do have more control over what is being served on every request with WordPress, though. That means if this does become a problem, you can optimize it.

Headless WordPress

WordPress isn't only for creating the basic blogs of the 90s. Instead, it's a powerful piece of software. You can use it to deliver real value to your users and make the content creation process smooth and predictable.

It doesn't add needless complexity but works well with you to create content and provide it to your users in a helpful way. It's not a solution for all, but it may be the right thing for your situation.