WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Jeff Starr v2.6.9

Disable WP REST API

Disables the WP REST API for visitors not logged into WordPress.

Disable WP REST API

The facts

Rating
4.8★ from 36
Active installs
30k+
Price
Free
Last updated
10 Aug 2026
Added
Jun 2018
Requires WP
4.7
Tested up to
WP 7.1
Requires PHP
5.6.20
Downloads
427,445

Our analysis

AI-assisted

Disable WP REST API is a WordPress plugin that completely disables the REST API for visitors who are not logged into WordPress. It requires no configuration and works as a plug-and-play solution. When a logged-out user attempts to access the REST API, they receive a message indicating that authentication is required.

This plugin is suitable for users who want to protect their site's REST data from unauthenticated access, particularly from bots and other non-logged users. However, it is not recommended for sites that need the REST API functionality for visitors who are not logged in.

Best for: This plugin suits users looking to restrict access to their site's REST API for unauthenticated visitors.

What it does well

  • Disables REST API for unauthenticated users
  • No configuration required
  • Lightweight with only 4KB of code
  • Provides a simple error message for logged-out users
  • Fast and effective solution

Where it falls short

  • Limited functionality in the free version
  • Not suitable for sites needing REST API access for non-logged users

Verdict

Disable WP REST API is a straightforward solution for enhancing site security by limiting REST API access. It is effective for specific use cases but may not meet the needs of all WordPress sites.

From the developer

Jeff Starr's own description of Disable WP REST API, lightly tidied.

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 »

Features

  • 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 »

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for integrating services.

LocoAI

LocoAI

89

LocoAI - Auto Translate For Loco Translate is a powerful tool for developers looking to quickly translate thei...

Free 70k+ installs 4.9★ (637)
Uncanny Automator

The AI + Automation plugin for WordPress. Automate workflows across all your plugins and apps, add an AI agent...

Free 40k+ installs 4.9★ (156)
Open User Map

Create custom interactive maps with free Leaflet-based styles, no Google Maps API key, frontend marker submiss...

Free 10k+ installs 5★ (67)
Activity Log

Monitor every change on your WordPress site — who did what, when, and where it came from — for a complete audi...

Free 200k+ installs 4.3★ (74)
Reviews Feed

No API key required. Display Yelp and Google reviews for any business in a clean, customizable feed on your si...

Free 100k+ installs 4.4★ (34)
Bit integrations

Contact Form, Google Sheet, MailChimp, Brevo, Webhook, Zoho CRM Automation and Integration plugin that Connect...

Free 20k+ installs 4.9★ (160)