On this page
What this issue is
The REST API is a built-in WordPress feature that lets the browser and plugins talk to your site in the background. It lives at addresses starting with /wp-json/. Block editor forms, some form plugins, and many page builders and chat or booking widgets send or load data through it.
Some owners turn it off to "harden" the site. A security plugin option, a code snippet, a firewall rule or a host setting can all do it. Visitors are blocked from endpoints a form needs, and the form stops working.
Why it costs you leads or sales
The page still looks normal. The form shows, the button can be clicked, but the submission returns an error, hangs, or shows a generic message. Visitors rarely try twice. You see fewer enquiries and no error in your inbox.
- Visitor opens pagePage loads normally
- Fills in formFields look fine
- Form calls /wp-json/Returns 401 or 403
- Email sentNever triggered
- Lead in CRMNever created
The form loads, but the background request is refused, so nothing reaches your inbox or CRM.
How to check if your site has it
Open the root endpoint
In a private window, visit https://yoursite.com/wp-json/. You should see a block of JSON text. A 401, 403, 404 or a message such as rest_cannot_access means it is blocked.
Try the plain-permalink form
Visit https://yoursite.com/?rest_route=/ . If this works but /wp-json/ does not, the issue is permalinks or a server rewrite rule.
Watch the form request
Open browser developer tools, go to the Network tab, submit the form and look for a red request to a /wp-json/ address. Note its status code.
Test while logged out
Some snippets only block visitors who are not logged in, so the API works for you as admin but fails for customers.
| Cause | Where to look |
|---|---|
| Security plugin option | Wordfence, iThemes/Solid Security, All In One WP Security settings |
| Disable REST API plugin | Plugins list, search for "REST API" |
| Code snippet | functions.php, code snippets plugin, must-use plugins |
| Firewall or CDN rule | Cloudflare, host firewall, ModSecurity |
| Server rewrite rule | .htaccess or nginx config blocking /wp-json |
How to fix it
Find the blockerWordPress
Deactivate security and REST-related plugins one at a time, retesting /wp-json/ each time. Do this on staging if you can.
Turn off the restrictionWordPress
In the plugin, look for options such as "Disable the REST API" or "Require authentication for REST API" and switch them off, or allow only the routes your form plugin needs.
Remove blocking codeWordPress
Search your theme and snippets for rest_authentication_errors or rest_enabled and remove or edit them.
Check firewall and server rules
Review CDN and host firewall rules and any rule for /wp-json in .htaccess or nginx. Ask your host if you cannot see them.
Resave permalinksWordPress
Go to Settings, Permalinks and click Save Changes to refresh rewrite rules.
add_filter('rest_authentication_errors', function ($result) {
if (!is_user_logged_in()) {
return new WP_Error('rest_cannot_access', 'Only authenticated users can access the REST API.', array('status' => 401));
}
return $result;
});REST API blocked
- /wp-json/ returns 401 or 403
- Form shows an error or spins
- No email or CRM entry
REST API restored
- /wp-json/ returns JSON
- Form confirms success
- Email and CRM entry arrive
How to confirm it's fixed
- /wp-json/ returns JSON in a private window while logged out
- The form request in the Network tab returns a 200 or 201 status
- The thank-you message or page appears
- The notification email reaches the right inbox
- The test lead appears in your CRM
- The block editor loads without errors
How to prevent it happening again
Re-test your forms after every security plugin change, plugin update and firewall edit. Write down why any REST restriction exists and who approved it. Keep security rules on staging first. Avoid copying "disable REST API" snippets from tutorials without checking what depends on it.
How FunnelGuard handles this
FunnelGuard detects this today. A robot visitor runs your real form journey on a schedule, fills in the form and submits it. If the REST API blocks the submission, the step fails. The failure is re-checked from a second region, then you get one alert with a screenshot and a likely cause. FunnelGuard also checks whether the test lead reaches your inbox and CRM. Test traffic is marked with utm_source=funnelguard and fg_test=1. The Free plan covers 1 site and 2 journeys with daily checks, no card needed.
Questions people ask
Why is my WordPress form not submitting?
Common causes are a blocked REST API, a JavaScript error, a caching or security plugin conflict, or broken mail settings. Open the browser Network tab, submit the form and check the failing request. A 401 or 403 on a /wp-json/ address points to a blocked REST API.
How do I check if the WordPress REST API is disabled?
Visit https://yoursite.com/wp-json/ in a private window. JSON text means it works. A 401, 403 or 404 error, or a rest_cannot_access message, means something is blocking it.
Is it safe to disable the WordPress REST API?
Fully disabling it is not recommended, because the block editor, many plugins and forms rely on it. If you want to reduce exposure, restrict specific endpoints such as user listings instead of blocking everything.
Why does wp-json work for me but not for visitors?
A snippet or security setting may only allow logged-in users. As admin you pass the check, but visitors get a 401. Test in a private window while logged out.
Which WordPress forms need the REST API?
It depends on the plugin and version. Block-based forms and some form, booking and chat plugins use it. Others use admin-ajax.php. Check the Network tab to see which address your form calls.
How do I fix a rest_cannot_access error?
Find what restricts the API: a security plugin option, a Disable REST API plugin, a rest_authentication_errors snippet or a firewall rule. Remove or loosen it, resave permalinks, then retest the form.
Can a firewall or Cloudflare block the REST API?
Yes. A WAF or CDN rule can block /wp-json/ or POST requests to it. Check the firewall event log for blocked requests that match your form submission time.
Related issues
- OPS-240Security plugin (Wordfence) blocking form posts or RESTFix guide
- OPS-239Caching plugin conflict (WP Rocket, LiteSpeed) breaking JSFix guide
- OPS-234Plugin auto-update breaks contact formFix guide
- OPS-237Contact Form 7 / WPForms / Gravity Forms mail settings brokenFix guide
- OPS-246Permalink flush breaking URLs (404s)Fix guide
- OPS-241Plugin conflict causing white screenFix guide