Headless CMS WordPress

Headless CMS: Use WordPress only as a backend

With a content management system (CMS) such as WordPress, websites can be created quickly and easily - even without programming knowledge. The backend and frontend are directly linked to each other. This is practical as long as content is only to be displayed via this one channel. However, websites are now just one of many media. If different channels and end devices (e.g. mobile apps) are to be filled with content at the same time, a so-called headless CMS can be useful.

In this article, we explain what a headless CMS actually is and whether WordPress can be used as a headless CMS . We also give you an overview of the most important advantages and disadvantages of headless CMS and headless WordPress.

What is a headless CMS?

In a classic CMS, content is entered via an interface in the backend and organized in databases (usually MySQL). From there, the system links the content directly to themes or design templates and displays it in the front end for visitors to the website.

A headless CMS is a content management system in which the backend and frontend are not linked. The term "headless" comes from the lack of a frontend. It is therefore a modified form of a classic content management system in which only the backend is used and the direct visual display (the frontend) is omitted.

Instead, the content is output from the database via an API (short for "Application Programming Interface"). This allows the content to be published completely dynamically on different devices and channels, centrally from a database. Websites and applications have access to the content via the interface, but control the display individually. A headless CMS is therefore only used to manage content and is decoupled from the presentation.

Headless vs. Decoupled CMS

In recent years, many classic content management systems have evolved in such a way that they can be used both regularly "with a head" and as a headless CMS. This is referred to as a "decoupled CMS", which basically still has a front end for the website, but is also accessible via API for various other channels.

Using WordPress like a headless CMS

WordPress can now also become a headless CMS. Strictly speaking, the so-called "headless WordPress" is then also a decoupled CMS: from version 4.7, a REST API is an integral part of the popular content management system.

This means that you can continue to use WordPress as usual "with all the trimmings", including the template engine for your website. However, you can also use the integrated interface to display your content in an app or on other channels, for example, if you wish. In the following, we explain roughly how this works technically and which components are required.

The WordPress REST API

Generally speaking, an API is a programming interface that developers can use to request and transfer data. A REST API is a specific type of interface that has a relatively simple structure and can be used very flexibly. The abbreviation "REST" stands for "Representational State Transfer".

The WordPress REST API is now basically a piece of code that allows other systems to communicate with WordPress. This communication takes place via HTTP requests (such as PUT, GET, POST or DELETE).

The GET requests are particularly relevant in the context of headless CMS, i.e. requests that are used to read specific content from the CMS. What exactly is to be read is defined via URLs.

If the REST API is to output all blog posts, this would be the command, for example:

GET http://domain.com/wp-json/wp/v2/posts/

The requests are entered via the command line, for example, in WordPress this is called WP-CLI. Depending on which data is to be queried, the URL is simply supplemented with the corresponding parameters.

WP-CLI at Raidboxes

With Raidboxes, WP-CLI is already pre-installed when you create a new box (i.e. a WordPress website) via the Raidboxes dashboard. However, you can also connect to Raidboxes via SSH terminal and use WP-CLI. You can find out more about this in our article The perfect WordPress development workflow with Git & SSH.

Raw, structured data as a basis

Data that is requested via the WordPress REST API is always delivered in JSON format. The abbreviation "JSON" stands for "JavaScript Object Notation". This is a standardized, text-based format for representing structured data based on JavaScript syntax. It is often used to transfer data in web applications (e.g. to send data from a server to the client so that it can be displayed on a website).

Basically, the REST API structures the content that you have entered in your CMS during the query and makes it readable as raw information in JSON format for other websites and applications. These can then process or display the information.

A customized front end

In the headless CMS, the frontend (the display) is clearly separated from the backend (the WordPress interface through which the content is entered in a structured manner). In the front end, the content is rendered from the CMS, i.e. assembled and displayed. WordPress is only used as a database from which the necessary information is retrieved via the REST API.

The designs for the frontend (or several frontends) are developed separately, independently of the CMS. They can be written in any programming language and use any technology. JavaScript frameworks such as React, Angular or Vue.js are particularly common.

Note

Using WordPress as a headless CMS and populating a website (or several applications) with content requires advanced programming and development work. There are therefore no direct instructions on how best to use headless WordPress. The actual implementation is ultimately up to you (or your developers).

Why should you use headless WordPress? The advantages

Now you're probably wondering why you should use WordPress headless if it also works great "with head". We have summarized the most important advantages here:

  • Multiple channels simultaneously: You can scale a headless CMS practically indefinitely. Any number of front ends can access the information in the back end via the API-based system and you can basically display your content anywhere and on any platform - whether on a website or in mobile apps. Augmented reality, virtual reality and the Internet of Things (IoT) are also conceivable.
  • Time saving: You manage your content in a headless CMS centrally from one place. Adjustments, additions or corrections only need to be made once and are then automatically visible on all channels. This saves time that you can invest in creative projects.
  • More flexible design: With a headless WordPress, you can design and structure your frontend even more freely. You are no longer tied to the possibilities of the classic CMS and the programming language is not predetermined. This gives you much more freedom in terms of design and allows you to implement even complex websites.
  • Faster performance: Since your headless WordPress only consists of a database and REST API calls, your system will be leaner and faster. In addition, you can develop your frontend with modern frameworks and thus ensure an improved user experience.
  • Greater security: Because your content in the database is detached from the front end, it is less susceptible to problems and there is less scope for malicious access and DDoS attacks, for example.

These advantages are particularly relevant for developers who otherwise struggle with static CMS and limited design options.

What are the disadvantages of headless CMS?

At the same time, a headless CMS or headless WordPress is also associated with some disadvantages that should not go unmentioned at this point:

  • The presentation cannot be directly influenced: What is a great advantage for developers becomes a limitation when entering content - at least if you want to make not only textual but also visual adjustments. This is because there is usually hardly any room for artistic freedom for non-developers.
  • Inconsistent user experience: If you use multiple platforms to distribute your content and the presentation is not consistent across all channels, this can have an inconsistent effect on users and worsen the user experience.
  • Double maintenance: A headless WordPress always runs separately from the frontend. This means that you always have to maintain and service two instances. This can be time-consuming.
  • Higher costs: It is more expensive to set up a headless WordPress. Maintenance is also more expensive, as you may need several developers to maintain two different instances.
  • Not all functions: Headless WordPress does not support the same functions one-to-one as WordPress in its classic form. For example, the WYSIWYG editor or the live preview do not work if the frontend is separate. In general, any plugin that affects the frontend cannot be used.

"*" indicates required fields

I would like to subscribe to the newsletter to be informed about new blog articles, ebooks, features and news about WordPress. I can withdraw my consent at any time. Please note our Privacy Policy.
This field is used for validation and should not be changed.

Conclusion: Who is Headless WordPress suitable for?

WordPress has become an integral part of the world of online content. This is unlikely to change much in the future. What may change is the way WordPress is used: classically or as a headless CMS. Headless WordPress has many advantages, but is not suitable for all purposes and users.

Whether your project is suitable for a headless CMS depends primarily on what you have in mind. Headless WordPress could be suitable if:

  • you want to implement a very individual design on your website that cannot be easily realized with WordPress themes and page builders.
  • you are planning a large project and want to present your content on different platforms and devices (e.g. on the website and in your own app).
  • you have programming skills yourself or have the opportunity to work with developers to build your own solution.

Headless WordPress is less suitable if:

  • you only want to make your content visible on one website (e.g. a blog) and don't need any particularly unusual design elements.
  • you only have a small budget available and your website needs to be adapted and maintained frequently.
  • you are a beginner, have no experience with development and programming and will create and manage your website on your own.

In the end, it can be said that if you only want to run a "normal" website and fill it with content, you're better off with classic WordPress, possibly combined with page builders for more design freedom. However, if you want to be present on various channels and have programming skills (or the resources for developers), you can consider using WordPress Headless.

Get started easily with WordPress

Would you prefer to use WordPress in the classic way? With Raidboxes, you can create your WordPress website in no time at all - and you don't have to worry about your WordPress hosting. We take care of backups, updates and more for you. Start now for free or get advice from our WordPress experts.

Frequently asked questions about the headless CMS WordPress

What is Headless WordPress?

Headless WordPress is an advanced version of the popular content management system that only uses the WordPress backend and database. The website is therefore not displayed directly from the CMS, but via a separate front end.

What headless CMS are there?

There are various providers on the market that specialize in headless CMS. The most well-known include Directus, Strapi, Cockpit, Contentful and Storyblok. In addition, many providers of classic CMS are now following suit and equipping their system with a REST API. This means that WordPress can now also be used headless.

How does a headless CMS work?

With a headless CMS, the backend and frontend are not linked. This means that the system does not visually display the content entered in the backend directly on the website. Instead, the content is made available from the database via a REST API. Any website or app can then retrieve and display the centrally maintained content via the interface.

Your questions about WordPress as a headless CMS

What questions do you have about WordPress as a headless CMS? Feel free to use the comment function. Would you like to be informed about further articles on WordPress and WooCommerce? Then follow us on LinkedIn, Facebook, Twitter or via our newsletter.

Did you like the article?

With your rating you help us to improve our content even further.

Write a comment

Your e-mail address will not be published. Required fields are marked with *