plugin-icon

Disable WP REST API

Deaktiviert die WP REST API für nicht in WordPress angemeldete Besucher.
Bewertungen
4.8
Version
2.6.8
Aktive Installationen
30K
Zuletzt aktualisiert
Apr 22, 2026

Does one thing: Completely disables the WordPress REST API for visitors who are not logged into WordPress. No configuration required.

Important: This plugin completely disables the WP REST API for visitors who are NOT logged in to WordPress. So not recommended if your site needs the WP REST API for any non-logged users.

👉 The fast, simple way to prevent abuse of your site’s REST/JSON API 👉 Protects your site’s REST data from all non-logged users and bots 👉 Uses only 4KB of code, so super lightweight, fast, and effective

🛠️ Pro version available! Check out REST Pro Tools »

Funktionen

  • Disable REST/JSON for visitors (not logged in)
  • Disables REST header in HTTP response for all users
  • Disables REST links in HTML head for all users
  • 100% plug-and-play, set-it-and-forget solution

How does it work?

This plugin completely disables the WP REST API unless the user is logged into WordPress.

  • For logged-in (authenticated) users, WP REST API works normally
  • For logged-out (unauthenticated) users, WP REST API is disabled

What happens if logged-out visitor makes a JSON/REST request? They will get only a simple message:

rest_login_required: REST API restricted to authenticated users.

This message may customized via the filter hook, disable_wp_rest_api_error. Check out this post for an example of how to do it.

Pro Version

🛠️ Check out the Pro version, REST Pro Tools, loaded with many awesome features:

  • One-click disable all routes
  • One-click disable all /users routes
  • Disable any specific user routes based on role
  • Whitelist any user IDs
  • Whitelist any IP addresses
  • Customize the REST error message
  • Customize the REST response code
  • Always require or force SSL/TLS
  • Disable all JSONP shenanigans
  • One-click disable any REST API headers
  • Add any post meta (custom field) to REST API
  • Add any user meta (custom field) to REST API
  • Add routes for site profile and author profile
  • Add routes for featured images and post categories
  • Add routes for post taxonomies and terms
  • At-a-glance check status of REST API

The free version does only one thing: disables REST API for unauthenticated users. The PRO version can do that and much more! Take full control of the REST API with REST Pro Tools »

Datenschutz

Dieses Plugin sammelt und speichert keine Benutzerdaten. Es setzt keine Cookies und es verbindet sich zu keinen Drittanbietern. Daher beeinträchtigt dieses Plugin die Privatsphäre des Benutzers in keiner Weise. Wenn überhaupt, dann verbessert es die Privatsphäre des Benutzers, da es potenziell sensible Informationen vor der Anzeige/Aufruf durch die RESP API schützt.

Disable WP REST API is developed and maintained by Jeff Starr, 15-year WordPress developer and book author.

Support development of this plugin

I develop and maintain this free plugin with love for the WordPress community. To show support, you can make a donation or purchase one of my books:

And/or purchase one of my premium WordPress plugins:

Links, tweets and likes also appreciated. Thank you! 🙂

Kostenlosmit kostenpflichtigen Tarifen
Mit deiner Installation stimmst du den Geschäftsbedingungen von WordPress.com sowie den Bedingungen für Drittanbieter-Plugins zu.
Getestet bis
WordPress 7.0
Dieses Plugin steht für deine -Website zum Download zur Verfügung.