Type to search.

#513 by installs

Disable REST API

by Dave McHaleVersion 1.8

Disable the use of the REST API on your website to site users. Now with User Role support!

Active installs
80,000+
#513 of 1,000
Downloads, all time
795.1K
795,107
Downloads, 30 days
8.2K
2.4K in the last 7
Rating
4.8 / 5
38 reviews
Last updated
3 years ago
Sep 14, 2023
Version
1.8
13 releases

Upkeep and compatibility

Last updatedSeptember 14, 2023Not updated for over a year
Tested up toWordPress 6.3.14Older than WordPress 7.1.4, the current release
Needs WordPress4.9 or newer
Needs PHP5.6 or newer
First publishedOctober 3, 2014
Support, last two months0 of 1 threads resolved (0%)

Reviews

4.8 / 5 from 38 reviews

Reviews by star rating
5 stars36
4 stars0
3 stars1
2 stars0
1 star1

Downloads, last 30 days

Low 75 a dayHigh 532 a day

What the author says it does

The most comprehensive plugin for controlling access to the WordPress REST API!

Works as a “set it and forget it” install. Just upload and activate, and the entire REST API will be inaccessible to your general site visitors.

But if you do need to grant access to some endpoints, you can do that too. Go to the Settings page and you can quickly whitelist individual endpoints (or entire branches of endpoints) in the REST API.

You can even do this on a per-user-role basis, so your unauthenticated users have one set of rules while WooCommerce customers have another while Subscribers and Editors and Admins all have their own. NOTE: Out of the box, all defined user roles will still be granted full access to the REST API until you choose to manage those settings.

For most versions of WordPress, this plugin will return an authentication error if a user is not allowed to access an endpoint. For legacy support, WordPress 4.4, 4.5, and 4.6 use the provided rest_enabled filter to disable the entire REST API.

The opening of the plugin's own description. The full text, installation notes and changelog are on its WordPress.org page.

Questions the author answers

How do I know if this plugin is working?

While logged into WordPress as any user, the REST API will function as intended. Because of this, you must use a new browser – or Chrome’s incognito mode – to test your website with a clean session. Go to yourdomain.com/wp-json/ (or yourdomain.com/?rest_route=/ if you have pretty permalinks disabled) while NOT LOGGED IN to test the results. You will see an authentication error returned if the plugin is active.

Does this plugin disable every REST API that is installed on my site?

This plugin is ONLY meant to disable endpoints accessible via the core REST API that is part of WordPress itself. If a plugin or theme has implemented their own REST API (not to be confused with implementing their own endpoints within the WordPress API) this plugin will have no effect.

Latest changelog entry

1.8

  • Tested up to WP v6.3
  • Added dra_error_message filter so devs can customize the access error message
  • Fixed bug that caused fatal errors if activating plugin on installations running the LearnPress plugin
  • Changed minimum requirements to PHP 5.6 (up from 5.3) and WordPress 4.9 (up from 4.4). Adding docblock comments to support minimums.

Screenshots

From WordPress.org.

Tagged

Plugins that share its tags

#964 by installs

Disable WP REST API

by Jeff Starr

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

Installs
30,000+
Rating
4.8 (36)
Updated
3 months ago

#577 by installs

Make Connector

by Make

Make Connector. Make lets you design, build, and automate by connecting with WordPress in just a few clicks.

Installs
70,000+
Rating
2.7 (25)
Updated
9 months ago

#46 by installs

Loginizer

by Softaculous

Loginizer is a WordPress security plugin which helps you fight against bruteforce attacks.

Installs
1+ million
Rating
4.8 (1K)
Updated
2 days ago

#70 by installs

Redux Framework

by David Anderson / Team Updraft

Redux is a simple, truly extensible, and fully responsive options framework for WordPress themes and plugins. It ships with an integrated demo.

Installs
900,000+
Rating
4.4 (273)
Updated
19 days ago

#154 by installs

WooCommerce Legacy REST API

by Automattic

The WooCommerce Legacy REST API, which is now part of WooCommerce itself but will be removed in WooCommerce 9.0.

Installs
400,000+
Rating
1.5 (29)
Updated
17 days ago

#157 by installs

Admin Menu Editor

by Janis Elsts

Lets you edit the WordPress admin menu. You can re-order, hide or rename menus, add custom menus and more.

Installs
300,000+
Rating
4.6 (312)
Updated
2 months ago

Where this page's numbers come from

Read from the WordPress.org plugin API on , when WordPress 7.1.4 was the current release. WordPress.org rounds active installs into buckets. These are the directory's figures, not my verdict, and I haven't tested this plugin.