Common REST API Errors

Errors: 'rest_no_route', 'rest_forbidden', 403/401 on /wp-json/.

WordPress → Settings → Permalinks → Save Changes (flush rewrite rules).

ModSecurity Blocking

Common with JSON requests – check ModSecurity hits for wp-json.

Specific Fixes

Disable Conflicting Security Plugins

Test by temporarily disabling Wordfence, iThemes, etc.

Allow API in .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule ^wp-json/(.*) /index.php?rest_route=/$1 [QSA,L]
</IfModule>

Common Issues Table

ErrorCauseFix
rest_no_routeBad URLCheck endpoint
rest_forbiddenAuthenticationUse nonce or app password
403 on wp-jsonModSecurityWhitelist rule
500 errorPHP issueIncrease memory