Disables the WP REST API for visitors not logged into WordPress.
As of April 2026, Disable WP REST API is a WordPress api plugin with 30K+ active installations and a 4.8/5 rating from 36 reviews. It has been downloaded 368K+ times in total. Requires WordPress 4.7+ and PHP 5.6.20+. Available on WordPress.org since 2018. Actively maintained — updated within the last month. Download volume is stable this week. Top alternative: WP Consent API.
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
How does it work?
This plugin completely disables the…
good job
just activate the plugin and it works.
I’ve tried many different solutions using functions.php because I did not want to install yet another plugin.
I’m glad I found this one though. It’s simple, lightweight, maintains privacy, and functions with the latest version of WordPress.
Thanks Jeff!
In generel a Good security concept .
But at the other end many plugin developer use the Rest API
Could be done much easier with a 5 3 line htaccess rule to block only ^.*wp-json/wp/v2/(users
But anyway a good solution if you have a simpel installation.
As the title says: Blocks Contact Form 7 forms sending after install and activate.
| WordPress | 4.7+ requiredTested up to 7.0 |
| PHP | 5.6.20+ required |
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!
Full changelog @ https://plugin-planet.com/wp/changelog/disable-wp-rest-api.txt
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.