What is Headless WordPress?
Headless WordPress is an application (desktop and/or mobile) that uses the WordPress database (the back end) but not the front-end user interface. The “head” that is missing is the WordPress end-user interface: the public facing part of the website.
Editors still use the WordPress editor and admin panel (back-end) to create content (posts, pages, and media files), and an external application outputs the content to the end user.
Headless WordPress is just one example of a headless CMS (content management systems). Drupal is a another CMS that can be headless. Decoupled architecture is another term for headless design.
Headless WordPress is an application that uses #WordPess back end but not front end. #headlessCMS #decoupledCMSClick To TweetWhy are Headless WordPress Sites So Popular Now?
Headless architecture allows designers to experiment with out-of-the-box, modern, exciting layouts without having to rewrite their CMS. They are a way to future-proof designs. Another trend in decoupled design is single-page applications which dynamically rewrite one page rather than load new pages from a server.
How are Headless WordPress Sites Built?
Often written in a JavaScript framework such as React, Vue or Angular, headless WordPress applications are created using the REST API included in WordPress 4.7. Earlier versions of WordPress required a plugin to add the REST API. The REST API is a standardized data format that allows applications to send and receive JSON (JavaScript Object Notations) objects via endpoints (a unique REST API URL). A WordPress endpoint URL looks something like this:
https://www.example.com/wp-json/wp/v2/posts/
Headless WordPress Resources
A deeper dive into how to create headless WordPress applications is beyond the context of this glossary, but here are some resources:
- How to Build React App on Top of WordPress REST API from Free Code Camp.
- REST API Handbook
- An Intro to Building Decoupled WordPress-Powered Websites using the WordPress REST API and Create React App