Plugin / Disable REST API for Real

Samuel Aguilera

Description

Description

The WordPress REST API is a great resource, but if you don’t want to use it probably you will want to close this door to your WordPress.

Unlike other popular plugins that aims to disable the REST API but only return an error, processed by the REST API, when a request is received, by default, this plugin removes all filters and actions related to WordPress REST API, and returns a 404 error for requests sent to the REST API URL endpoints, effectively blocking any use of the REST API.

Optionally you can set the REST API setting in Settings -> General page to “Logged In Only” for a less drastical action, to keep REST API access enabled but require the user to be logged in to accept the requests.

If you’re happy with the plugin please don’t forget to give it a good rating, it will motivate me to keep sharing and improving this plugin (and others).

SUPPORT: If you have any support question, please create an issue at the Github repository.

Requirements

  • WordPress 4.7 or higher.

Features

  • Disable WordPress core REST API for real by removing all filters and actions related to it and returning a 404 error for requests sent to REST API URL endpoints (e.g. https://example.com/wp-json/whatever ).
  • Option to require user to be logged in to use the REST API instead of completely disable it.

Usage

To disable the REST API completely simply install the plugin from the Plugins page and enable it.

If you don’t want to disable the REST API but require user to be logged in instead, go to Settings -> General page and set the REST API to option to “Logged In Only”, and click Save Changes.

You can change the option back to “Off” if you want to disable the REST API again.

To return to WordPress default, simply deactivate the plugin.

Ratings

5
3 reviews

Rating breakdown

Details Information

Version

2.1.1

First Released

13 Sep, 2016

Total Downloads

2,573

Wordpress Version

4.7 or higher

Tested up to:

5.3

Require PHP Version:

-

Tags

Contributors

Languages

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.