REST API Only

By jakubkanna

0+ active installationsVersion 1.0.2

Force all non-admin, non-AJAX, and non-REST API requests to return a 404 for headless or API-only sites.

Description

This plugin forces all non-admin, non-AJAX, and non-REST API requests to return a 404 status code.
Ideal for headless WordPress environments or sites that should expose only the API.

Installation

  1. Upload the plugin folder to /wp-content/plugins/
  2. Activate the plugin through the “Plugins” menu in WordPress

Changelog

1.0.2

  • Updated plugin author attribution to Studio JKN with author URL.

1.0.1

  • Adjusted plugin name capitalization and added a direct access guard.

1.0.0

  • Initial release.