What You’ll Learn
- Check if the REST API is accessible
- Fix permalink settings that block REST API
- Identify plugins that disable REST API
- Resolve server-level REST API blocks
Prerequisites
- Admin access to your WordPress site
- Ability to access plugin settings
- Access to wp-config.php (for server-level fixes)
Check if REST API is Blocked
Visit this URL in your browser (replace with your actual domain):Fix Permalink Settings
The REST API requires non-Plain permalinks due to a WordPress limitation.Check for Plugins Disabling REST API
Security and performance plugins often include options to disable the REST API. While this rarely improves security or performance, some users enable it.Plugins That Can Disable REST API
| Category | Plugins |
|---|---|
| Security | Solid Security (iThemes), Wordfence, All-In-One Security (AIOS), Sucuri, Shield Security, BulletProof Security, NinjaFirewall, Titan Anti-spam & Security |
| Performance | Perfmatters, Swift Performance, Clearfy Cache |
| Privacy/Hiding | WP Hide & Security Enhancer, Hide My WP Ghost, Password Protected |
| REST API Control | Disable REST API, WP REST API Controller, WP OAuth Server |
| CDN/Firewall | Cloudflare WAF |
These plugins don’t disable REST API by default. If you have any installed, check their settings for REST API options.
Find the Blocking Plugin
Test after each
After each deactivation, test
https://your-site.com/wp-json/ to see if REST API responds.Server-Level Restrictions
Web server configurations (Apache or NGINX) can block REST API requests by restricting paths starting with/wp-json/.
Check .htaccess (Apache)
Look in your site’s.htaccess file for rules that might block /wp-json/ requests.
Check NGINX Configuration
If using NGINX, check your server configuration for location blocks that restrict/wp-json/ access.
Contact Your Host
If you’re unable to identify the blocking rule, contact your hosting provider and ask them to verify that REST API requests are not being blocked at the server level.Required Endpoints for MainWP
If you’re using the MainWP browser extension or REST API integrations, these endpoints must be accessible:| Endpoint | Purpose |
|---|---|
/mainwp/v1/sites/all-sites | List all connected sites |
/mainwp/v1/sites/sites-available-updates-count | Get update counts |
/mainwp/v1/site/non-mainwp-changes-count | Track non-MainWP changes |
REST API Security Considerations
The REST API is active by default on WordPress sites and is the standard communication protocol for modern WordPress functionality. Keeping it enabled:- Presents no increased security risk compared to traditional methods
- Is required for Gutenberg editor, many plugins, and mobile apps
- Can be secured through proper authentication rather than disabling
Self-Check Checklist
- Tested REST API by visiting /wp-json/ directly
- Verified permalink structure is not set to Plain
- Checked installed plugins for REST API disable options
- Confirmed server-level restrictions are not blocking REST API
- REST API returns JSON data when accessed
Related Resources
- MainWP Browser Extensions - Uses REST API
- MainWP REST API Overview - API documentation
- Troubleshoot Connection Problems - General connection issues
