Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/flexseth/wordpress-disable-rest-api/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Disable the WordPress REST API
install this plugin to remove access to the REST API in a WordPress installation.
Endpoint location for testing
To test this plugin, enter your url, followed by
/wp-json/v2/posts
You should receive an error Access Denied
{"code":"access denied","message":"REST API Disabled","data":{"status":403}}