How to Fix WordPress REST API Disabled Error in cPanel
Posted about 4 months ago 4.5kREST API Disabled Symptoms
Error: 'The REST API is disabled on this site' or 403 on /wp-json/.
Check wp-config.php
Remove or comment out any line with DISABLE_REST_API.
Security Plugin Conflict
Disable Wordfence, iThemes Security, or All In One Security temporarily.
Server-Side Blocks
ModSecurity Blocking
Check ModSecurity hits for wp-json requests → Disable problematic rules.
Allow REST API in .htaccess
<IfModule mod_rewrite.c>
RewriteRule ^wp-json/(.*) /index.php?rest_route=/$1 [QSA,L]
</IfModule>
Solutions Table
| Cause | Solution |
|---|---|
| Plugin disable | Deactivate security plugin |
| Config define | Remove DISABLE_REST_API |
| ModSecurity | Whitelist REST API rules |
| .htaccess block | Add rewrite rule |