Off with Their Heads! What “Headless WordPress” Can Do…and Can’t Do

hey reliable - Brian Checkovich by Brian Checkovich
October 15, 2022
Off with Their Heads! What “Headless WordPress” Can Do…and Can’t Do

In Scottsdale, Arizona, is a cryogenics facility where the heads of 168 deceased people sit frozen, awaiting the day when perhaps medical science can reverse fatality. So cleaving a head from the body is kind of a radical idea, and it might pay off one day, assuming you’d want to live through the potential hellscape of Earth, Year 2122.

But as far as WordPress goes, separating the head from the body is a concept that many web developers have toyed with, and here we’ll consider the upside and downside of this so-called “headless WordPress.” It isn’t a ghoulish creation, but it’s also not a panacea to solve some of the puzzles that WP can present. Since WP is the content-management system that handles around 40% of all websites on our planet, what happens there has important implications.

Head, Meet Body

First, let’s do a little WP anatomy lesson. WordPress is basically bifurcated into two domains, the frontend (the head) and the backend (the body). The front end is what users experience when they visit your website. It’s the images they see, it’s the CTA buttons they’ll click on, and it’s the forward face of your brand.

The backend is where the magic happens, where content is created and its presentation crafted. You build in the backend what users will see in the front end. But it’s crucial to understand that these two domains are distinctly separate. For them to “speak” to each other, WordPress utilizes the REST API.

For the vast majority of WP users, this coupling of frontend to backend works extremely well, just as in most cases the head and body link up to sustain life. It’s a no-brainer. Why would you ever separate the head from the body? Wouldn’t that move pretty much spell doom?

Removing the Head

The key to “headless WordPress” resides in the REST API. This application interface can connect not only the backend to the frontend within WP, but the backend to a wide array of platforms that can serve as the frontend outside of WP. Hence, the moniker “headless WordPress.”

The benefit here is that the powerful tools in WP’s backend can be used to develop your website, but now you’re free to expand beyond what WP allows. Essentially, for the frontend WP offers PHP-coded templates, with some Javascript mixed in, but by lopping off WP’s “head,” you can now link up your website to third-party apps coded in Python or powered by libraries like Vue.js. What was once incompatible can be reversed with just a few snippets of code as long as you can connect to the REST API.

Security Benefits

In addition to the bounteous creative landscape that a headless approach can bestow, there are possible security improvements, under the generic label of “Not All of Your Eggs Are in One Basket.” That basket, WordPress, makes a very inviting target to hackers, because it carries a ton of traffic and some sites aren’t well protected. According to one study, around 70% of all WP sites are vulnerable to hacking, and so one step you can take is to de-couple the front end from the backend.

Yes, going headless can protect you. It doesn’t seem logical that having no head can make you safer, but in this case, it does. With just your frontend exposed to the nefarious criminals looking to hijack your site, your backend data is removed and separate, and thus immune from malware. DDoS attacks can only target one area at a time since you have frontend and backend housed on different servers.

Performance Boost

WordPress has been called a “monolith,” a term usually associated with cultures where innovation is curtailed. In this case, monolith refers to the PHP-coded templates that make WP easy to use for non-developers. The downside is that the content being generated is available only in HTML, and it’s non-static.

That means each time a visitor comes to a new page, the browser basically ingests all the content off the web server, which can slow down load times. This so-called “server-side rendering” can sink your Google rank if load times fall too low. Going headless allows you to use the API to connect to static pages, where the load times are lightning-fast.

And Yet…

One legitimate question persists, however. If going headless offers so many clear advantages, why aren’t more WP users stampeding for this solution? Ah, that’s because going headless has some serious drawbacks that you can’t ignore.

The bottom line is that if you aren’t a pretty polished developer, then going headless might be a bit too much to handle. Sure you can watch fifty YouTube tutorials on how to de-couple WP’s frontend and backend, and guess what? Now you’re on your own. Any bugs and kinks you’ll have to fix yourself, combing through blogs for ideas. This can eat up time you don’t have.

And WordPress works for developers and non-developers alike, and thus splitting the head from the body can lead to confusion if not everybody is up to speed. Clients won’t be happy if they can’t really access their own website.

The Queen

The Queen of Hearts in Alice in Wonderland ordered: “Off with their heads!” When it comes to WordPress, unless you’re building a multi-channel platform or you can code in Python, you’re probably better off not decapitating the front end. You might get twice the headaches even though you don’t have a head.

Questions or comments about this post? We're here for you at info@heyreliable.com!


Introducing Hey Reliable WP Maintenance Packages – 20% Off + Free Gift!
WordPress Introducing Hey Reliable WP Maintenance Packages – 20% Off + Free Gift! Are you an agency, designer, or just a boss with one or more
Ways to Make WordPress Search Faster, Smarter, Better
WordPress Ways to Make WordPress Search Faster, Smarter, Better Never before have so many people spent so much time in the act
Boost Your WordPress Site’s Security: A Complete Guide
WordPress Boost Your WordPress Site’s Security: A Complete Guide If you're running a website on WordPress, you're probably always looking for ways
Send a quick email