Skip to main content
Agency Program 50% cashback. 10% commissions. Priority support. Built for growing agencies. 50% cashback for agencies Speak to the team Join free
Disable WP REST API icon

Disable WP REST API

v2.6.4
by Jeff Starr · 4.8 (35 reviews)

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

20K+ active installs Updated Oct 07, 2024 Tested to 6.7.2 Requires PHP 5.6.20
Try Demo Download
Pre-installed Ready in ~10s No card

About Disable WP REST API

This plugin disables the WP REST API for visitors who are not logged into WordPress. It is lightweight, fast, and effective with no configuration required. It works by completely disabling the WP REST API for logged-out users and only allowing access for logged-in users.

Frequently asked questions

What does this plugin do?
This plugin disables the WP REST API for visitors who are not logged into WordPress. It is a lightweight and effective solution with only 22 lines of code.
How does it work for WordPress versions 4.7 and above?
For WordPress 4.7 and better, the plugin completely disables the WP REST API for logged-out users. Logged-in users will still have normal WP REST API functionality.
What happens if a logged-out visitor tries to access the REST API?
If a logged-out visitor makes a JSON/REST request, they will receive the message: "rest_login_required: REST API restricted to authenticated users." This message can be customized using a filter hook.
How does it work for older versions of WordPress?
For WordPress versions less than 4.7, this plugin disables all REST API functionality for all users.
Does this plugin affect user privacy?
This plugin does not collect or store any user data, set cookies, or connect to third-party locations. It improves user privacy by protecting potentially sensitive information from being accessed via the REST API.

Changelog

If you like Disable WP REST API, please take a moment to give a 5-star rating. It helps to keep development and support going strong. Thank you!

2.6.4

  • Tests on WordPress 6.7

Full changelog @ https://plugin-planet.com/wp/changelog/disable-wp-rest-api.txt

Try other plugins