Skip to content

REST API disabled in WordPress

It took me an embarrassing amount of time to troubleshoot the REST API error “REST API disabled” when trying to modify my Jetpack settings. All of my google searches brought me to things related to iThemes Security and the JSON API module inside of Jetpack. None of which applied to me.

Finally, after doing what should have been the most obvious answer, I grep’d through my WordPress installation for the error message when I tried to make a REST API query:

$ grep -iIR “REST API disabled” ./*
./wp-content/plugins/w3-total-cache/PgCache_Plugin.php: $error_message = __( ‘REST API disabled.’, ‘w3-total-cache’ );

So it appears that the ‘Page Cache’ plugin inside of W3 Total Cache has its own option to disable the REST API, outside of iThemes or Jetpack. To fix this issue, navigate to:

Performance > Page Cache > Scroll down to the section titled ‘REST API’

Then select the radio button labled, “Don’t cache” and click “Save Settings and Purge All Caches.” Depending on your site/s size and how many resources the caching uses, you may just want to click, ‘Save Settings.’ On small sites like the ones I host, I only have a few hundred visitors per day, so the purging and priming of my cache is very quick.

Published inUncategorized

Be First to Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: