The guide

WordPress as a pure CMS: less is more

How to leave WordPress "stripped bare" so it does just one thing: store and serve content.

The first instinct when you set up a WordPress is to cram it full of plugins. One for SEO, another for caching, another for forms, whichever visual builder is in fashion… and before you know it you’ve got thirty pieces squabbling with each other. With headless we do exactly the opposite: we leave WordPress stripped bare.

It sounds odd, but it’s liberating. The less the backend does, the faster it runs, the less it breaks and the smaller the attack surface it offers. A well-built headless WordPress is light and boring — in the best possible sense.

The diet: what we take away

  • The theme. None active. The presentation layer lives outside, on the front end.
  • Visual builders (Elementor and the rest). They’re heavy, they lock you in and they’ve got no business here.
  • Page-caching and heavyweight SEO plugins. The front end takes care of that — and it’s static, on top of everything.

What we do keep

  • WordPress itself and its same old editor — the thing the client already knows how to use.
  • The REST API, which comes out of the box and is our way out.
  • A thin layer of «glue»: a must-use plugin. And, if content needs structuring, custom fields.

The mu-plugin trick

A must-use plugin always loads and can’t be switched off by accident from the dashboard. It’s the perfect place for headless logic: it doesn’t clutter the client’s plugin list and nobody turns it off by mistake. You drop it into wp-content/mu-plugins/ and with barely a few lines you’ve already got your own endpoint:

<?php
// wp-content/mu-plugins/headless.php
add_action( 'rest_api_init', function () {
  register_rest_route( 'miapp/v1', '/home', array(
    'methods'  => 'GET',
    'callback' => 'devolver_datos_de_la_home',
    'permission_callback' => '__return_true',
  ) );
} );

From there, the front end requests /wp-json/miapp/v1/home and gets exactly what it needs, in a single call.

A good headless backend goes unnoticed. It just stores content and serves it clean. Everything else is surplus.

And while you’re building it, where does it run?

In development, the comfiest way to spin up WordPress is Local (by Flywheel/WP Engine): it builds you a complete site — nginx, PHP and MySQL — with a .local domain and without touching a single line of config. This very project was built that way. Check that the API responds with curl http://your-site.local/wp-json/ and you’re good to go.

Let your agent set it up

Copy this across to put your WordPress on a diet and ready for headless:

Prepare this WordPress as a headless CMS following the wp-wow
skill: create a must-use plugin in wp-content/mu-plugins
that registers its own REST endpoint, leave the site with no active theme
and no surplus plugins, and verify that /wp-json responds.

In the next chapter we throw that way out wide open: the REST API.

What now?

Build it yourself
or have me build it?

If you’d rather build it yourself, the step-by-step guide is here. And if you’d prefer I build it, tell me about your project and let’s talk.