{"id":326183,"date":"2026-06-18T15:54:22","date_gmt":"2026-06-18T15:54:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/maxtdesign-rest-api-control\/"},"modified":"2026-06-18T15:53:40","modified_gmt":"2026-06-18T15:53:40","slug":"maxtdesign-rest-api-control","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/maxtdesign-rest-api-control\/","author":23163067,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.5","stable_tag":"1.0.5","tested":"7.0","requires":"6.4","requires_php":"8.2","requires_plugins":null,"header_name":"MaxtDesign REST API Control","header_author":"MaxtDesign","header_description":"Full control over your WordPress REST API. Block, restrict, or whitelist endpoints per user role. Lightweight, fast, zero frontend footprint.","assets_banners_color":"70327a","last_updated":"2026-06-18 15:53:40","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/maxtdesign.com\/plugins\/disable-rest-api","header_author_uri":"https:\/\/maxtdesign.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":26,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.5":{"tag":"1.0.5","author":"slaacr","date":"2026-06-18 15:53:40"}},"upgrade_notice":{"1.0.5":"<p>Internationalization fix so the plugin is translatable via WordPress.org. No functional change.<\/p>","1.0.4":"<p>Plugin renamed to &quot;MaxtDesign REST API Control.&quot; Cosmetic only \u2014 your settings and behaviour are unchanged.<\/p>","1.0.3":"<p>Fixes route-level whitelisting for parameterized endpoints (namespace whitelisting was already fine) and makes multi-role access most-permissive. Recommended for anyone using per-route or per-role rules.<\/p>","1.0.2":"<p>Security fix. Closes a fail-open on the REST API root (<code>\/wp-json\/<\/code>) that left the discovery endpoint exposed even when the plugin was active. Update immediately.<\/p>","1.0.1":"<p>WordPress 7.0 compatibility confirmed. Hardens settings import and the activation path. Recommended for all users.<\/p>","1.0.0":"<p>Initial release. Take full control of your WordPress REST API.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3577509,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3577509,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3577509,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3577509,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.5"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3577509,"resolution":"1","location":"assets","locale":"","width":2560,"height":1600},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3577509,"resolution":"2","location":"assets","locale":"","width":2560,"height":1600},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3577509,"resolution":"3","location":"assets","locale":"","width":2560,"height":1600},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3577509,"resolution":"4","location":"assets","locale":"","width":2560,"height":1600}},"screenshots":{"1":"Global settings \u2014 one-click toggle to disable REST API for unauthenticated users.","2":"Endpoint whitelist \u2014 auto-discovered endpoints with collapsible namespace tree.","3":"Per-role controls \u2014 restrict REST API access for individual user roles.","4":"Import\/Export \u2014 easily transfer settings between sites."}},"plugin_section":[],"plugin_tags":[267745,125786,32184,23853,600],"plugin_category":[54],"plugin_contributors":[250063],"plugin_business_model":[],"class_list":["post-326183","plugin","type-plugin","status-publish","hentry","plugin_tags-api-control","plugin_tags-disable-rest-api","plugin_tags-json-api","plugin_tags-rest-api","plugin_tags-security","plugin_category-security-and-spam-protection","plugin_contributors-slaacr","plugin_committers-slaacr"],"banners":{"banner":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/banner-772x250.png?rev=3577509","banner_2x":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/banner-1544x500.png?rev=3577509","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/icon-128x128.png?rev=3577509","icon_2x":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/icon-256x256.png?rev=3577509","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/screenshot-1.png?rev=3577509","caption":"Global settings \u2014 one-click toggle to disable REST API for unauthenticated users."},{"src":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/screenshot-2.png?rev=3577509","caption":"Endpoint whitelist \u2014 auto-discovered endpoints with collapsible namespace tree."},{"src":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/screenshot-3.png?rev=3577509","caption":"Per-role controls \u2014 restrict REST API access for individual user roles."},{"src":"https:\/\/ps.w.org\/maxtdesign-rest-api-control\/assets\/screenshot-4.png?rev=3577509","caption":"Import\/Export \u2014 easily transfer settings between sites."}],"raw_content":"<!--section=description-->\n<p><strong>MaxtDesign REST API Control<\/strong> gives you complete control over who can access your WordPress REST API and which endpoints are available.<\/p>\n\n<p>By default, WordPress exposes a REST API to the public, which can reveal usernames, post data, and site structure to anyone. This plugin lets you lock down the REST API for unauthenticated visitors while keeping it fully functional for logged-in users and the plugins that need it.<\/p>\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li><strong>One-click disable<\/strong> \u2014 Block all REST API access for unauthenticated users with a single toggle.<\/li>\n<li><strong>Endpoint whitelisting<\/strong> \u2014 Auto-discovers all registered REST API endpoints and lets you whitelist specific ones, even when the API is disabled.<\/li>\n<li><strong>Per-role access control<\/strong> \u2014 Restrict REST API access for specific user roles with individual endpoint whitelists.<\/li>\n<li><strong>Smart defaults<\/strong> \u2014 Automatically detects Contact Form 7 and WooCommerce and whitelists their required endpoints on activation.<\/li>\n<li><strong>Zero frontend footprint<\/strong> \u2014 No CSS, JavaScript, or HTTP requests are added to your frontend. Ever.<\/li>\n<li><strong>Lightweight<\/strong> \u2014 No database queries on frontend requests. Uses a single autoloaded option.<\/li>\n<li><strong>Import\/Export<\/strong> \u2014 Transfer settings between sites with JSON export and import.<\/li>\n<li><strong>Clean uninstall<\/strong> \u2014 Removes all plugin data when deleted. Leaves no trace.<\/li>\n<\/ul>\n\n<h4>How It Works<\/h4>\n\n<p>The plugin uses the <code>rest_authentication_errors<\/code> filter \u2014 the correct, modern WordPress approach \u2014 to intercept REST API requests early in the lifecycle, before any endpoint logic executes. This means blocked requests have virtually zero performance impact.<\/p>\n\n<h4>Built for Performance<\/h4>\n\n<p>This plugin follows the MaxtDesign performance-first philosophy:<\/p>\n\n<ul>\n<li>Zero frontend asset loading (no CSS, no JS, no HTTP requests)<\/li>\n<li>Admin assets load only on the plugin's own settings page<\/li>\n<li>Single autoloaded database option \u2014 no extra queries<\/li>\n<li>Filter fires before endpoint logic \u2014 blocked requests are fast<\/li>\n<\/ul>\n\n<h3>Privacy<\/h3>\n\n<p>This plugin makes no external HTTP requests, sets no cookies, loads no third-party scripts, and collects no analytics. It does not track usage and never \"calls home.\" It stores a single settings option (<code>mdra_settings<\/code>) in your database and nothing else; that option is removed when you delete the plugin. No personal or visitor data is processed or transmitted.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>maxtdesign-rest-api-control<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress.<\/li>\n<li>Go to <strong>Settings &gt; REST API Control<\/strong> to configure.<\/li>\n<li>The REST API is blocked for unauthenticated users by default. Adjust the whitelist as needed.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"will%20this%20break%20my%20site%3F\"><h3>Will this break my site?<\/h3><\/dt>\n<dd><p>No. The plugin only affects REST API requests. Your website's frontend, admin dashboard, and all standard WordPress functionality remain completely unaffected. Logged-in users have full REST API access by default.<\/p><\/dd>\n<dt id=\"does%20this%20work%20with%20contact%20form%207%3F\"><h3>Does this work with Contact Form 7?<\/h3><\/dt>\n<dd><p>Yes. Contact Form 7 requires the REST API for form submissions. The plugin automatically detects CF7 on activation and whitelists its endpoints. If you activate CF7 after this plugin, simply check the <code>contact-form-7<\/code> namespace in the endpoint whitelist.<\/p><\/dd>\n<dt id=\"does%20this%20work%20with%20woocommerce%3F\"><h3>Does this work with WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. The plugin automatically detects WooCommerce on activation and whitelists the Store API endpoints (<code>wc\/store<\/code>) needed for cart and checkout blocks. The WooCommerce admin API endpoints are available to logged-in users by default.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20deactivate%20the%20plugin%3F\"><h3>What happens when I deactivate the plugin?<\/h3><\/dt>\n<dd><p>Your REST API returns to normal WordPress behavior \u2014 fully open. Your settings are preserved so they'll be restored if you reactivate. Settings are only deleted when you <strong>delete<\/strong> the plugin through the WordPress admin.<\/p><\/dd>\n<dt id=\"does%20this%20affect%20the%20wordpress%20block%20editor%20%28gutenberg%29%3F\"><h3>Does this affect the WordPress block editor (Gutenberg)?<\/h3><\/dt>\n<dd><p>No. By default the plugin only restricts <strong>unauthenticated<\/strong> requests, and every logged-in user keeps full REST API access \u2014 so the block editor, which talks to the REST API as the logged-in author, is completely unaffected. The \"Allow REST API for all logged-in users\" toggle is on out of the box specifically to keep the editor, dashboard, and admin AJAX working. You would only see editor issues if you deliberately turn that toggle off <strong>and<\/strong> restrict your own role without whitelisting <code>wp\/v2<\/code> \u2014 which the per-role UI makes explicit.<\/p><\/dd>\n<dt id=\"can%20i%20restrict%20specific%20user%20roles%3F\"><h3>Can I restrict specific user roles?<\/h3><\/dt>\n<dd><p>Yes. The Per-Role Controls section lets you restrict REST API access for individual roles (subscriber, contributor, author, editor, etc.) and configure a custom endpoint whitelist for each restricted role.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20a%20user%20has%20more%20than%20one%20role%3F\"><h3>What happens if a user has more than one role?<\/h3><\/dt>\n<dd><p>The most permissive role wins. If a user holds any role that is <strong>not<\/strong> restricted, they keep full REST API access. If every one of their roles is restricted, the plugin combines the whitelists of all those roles and allows a request that any of them permits. This prevents a single restricted role (for example a stray <code>subscriber<\/code> capability) from unexpectedly locking out a user who also has an unrestricted role.<\/p><\/dd>\n<dt id=\"does%20this%20work%20with%20custom%20rest%20api%20endpoints%3F\"><h3>Does this work with custom REST API endpoints?<\/h3><\/dt>\n<dd><p>Yes. The plugin auto-discovers all registered REST API endpoints, including those from themes and other plugins. Any custom endpoints will appear in the whitelist tree.<\/p><\/dd>\n<dt id=\"how%20do%20i%20transfer%20settings%20to%20another%20site%3F\"><h3>How do I transfer settings to another site?<\/h3><\/dt>\n<dd><p>Use the Export Settings button to download a JSON file, then use Import Settings on the other site to upload it.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Internationalization: the text domain now matches the plugin slug (<code>maxtdesign-rest-api-control<\/code>) so the plugin can be translated through the WordPress.org translation system. No functional change.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Renamed the plugin to <strong>MaxtDesign REST API Control<\/strong> to better reflect what it does \u2014 whitelist and per-role control, not just an on\/off switch. The in-product menu and settings page were already named \"REST API Control\"; this aligns the plugin's public name with them. No settings, hooks, or behaviour changed.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Fix: route-level whitelisting now works for parameterized endpoints. Checking an individual route such as <code>wp\/v2\/posts\/(?P&lt;id&gt;[\\d]+)<\/code> previously stored a corrupted value (the sanitiser mangled the regex) and could never match a real request. Route patterns are now stored intact and matched the way WordPress itself matches them. Namespace-level whitelisting was unaffected.<\/li>\n<li>Improve: multi-role users now get the most permissive result. Any unrestricted role grants full access; if every role is restricted, their whitelists are combined. Previously the first restricted role found could lock out a user who also held an unrestricted role.<\/li>\n<li>Fix: the \"requires REST API access\" compatibility warnings now appear on every visit to the settings page, not only immediately after saving.<\/li>\n<li>Improve: smart defaults are now seeded per-site on multisite \u2014 both on network-wide activation and for sites created later.<\/li>\n<li>Improve: the custom error message now stores empty as \"use the default,\" so the blocked-request message always follows the site's current language instead of freezing whichever locale was active when it was saved.<\/li>\n<li>Performance: the settings page no longer instantiates its admin UI on front-end or REST requests, and discovers the REST route table only once per page load.<\/li>\n<li>Housekeeping: removed an unused internal placeholder class and tidied redundant nonce-check branches.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Fix: the REST API root index (<code>\/wp-json\/<\/code>) is now blocked when \"Disable REST API for unauthenticated users\" is on. Previously, the controller's route-lookup returned an empty string for the root index and the code took an early fail-open branch \u2014 meaning the most-scraped discovery URL was always exposed even when the plugin was active. Logged-out visitors and unauthenticated scrapers now hit the configured error response on <code>\/wp-json\/<\/code> like any other endpoint.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Compatibility: confirmed against WordPress 7.0 (\"Armstrong\").<\/li>\n<li>Hardening: import-settings now validates uploads with <code>is_uploaded_file()<\/code> and reads the temp file directly instead of mis-sanitising the server-generated path.<\/li>\n<li>Hardening: activation hook defensively loads <code>wp-admin\/includes\/plugin.php<\/code> before calling <code>is_plugin_active()<\/code> so WP-CLI and multisite bulk-activate paths can't fatal.<\/li>\n<li>Fix: the \"this plugin requires REST API access\" compatibility notice no longer fires for plugins whose namespaces aren't actually registered on the site (e.g. WooCommerce installed but Store API blocks not loaded).<\/li>\n<li>Cleanup: removed the now-unnecessary <code>load_plugin_textdomain()<\/code> call. WordPress.org handles translation loading automatically since WP 4.6, and the just-in-time loader added in 6.7 made the explicit call dead code.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Global REST API toggle for unauthenticated users.<\/li>\n<li>Auto-discovery of all registered REST API endpoints.<\/li>\n<li>Endpoint whitelisting with collapsible namespace tree.<\/li>\n<li>Per-role REST API access controls.<\/li>\n<li>Smart defaults for Contact Form 7 and WooCommerce.<\/li>\n<li>Custom error message for blocked requests.<\/li>\n<li>Settings import\/export as JSON.<\/li>\n<li>Clean uninstall \u2014 removes all plugin data.<\/li>\n<\/ul>","raw_excerpt":"Full control over your WordPress REST API. Block, restrict, or whitelist endpoints per user role. Lightweight, fast, zero frontend footprint.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/326183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=326183"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/slaacr"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=326183"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=326183"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=326183"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=326183"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=326183"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=326183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}