Skip to content
Put your WordPress site in headless mode -- wp-admin, wp-rest-api and wp-graphql only.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

A helper plugin for putting WordPress in "headless mode". Designed for when WordPress is the CMS for a headless/ decoupled WordPress site.

What This Plugin Does

This plugin blocks all requests to a WordPress site accept for:

  • wp-admin
  • The WordPress REST API
  • wp-cron (debatable)
  • WP GraphQL

This is largely based on a code snippet from Jason Bahl of WP GraphQL.

How To Use This Plugin

  1. Set hte constant HEADLESS_MODE_CLIENT_URL to the URL for the front-end client
  2. Activate plugin.
  3. Profit

Install With Composer

  "minimum-stability": "dev",
  "repositories": [
      "type": "git",
      "url": ""
  "require": {
    "shelob9/headless-mode": "*"
  "extra": {
    "wordpress-plugin": "wp-content/plugins/{$name}",
    "wordpress-theme": "wp-content/themes/{$name}",
    "wordpress-muplugin": "wp-content/mu-plugins/{$name}"
You can’t perform that action at this time.