Fix Contact Form 7 Not Working With All-In-One Security (AIOS) in WordPress

If Contact Form 7 stops working on your WordPress site, hangs after a visitor clicks Send, or fails with a server error, the cause is often the All-In-One Security (AIOS) plugin blocking WordPress REST API requests. The submit button spins, the message never sends, and no clear error appears to the visitor. This guide explains why that happens and gives you two ways to fix it while keeping your firewall in place.

Last reviewed: 27 July 2026, against All-In-One Security (AIOS) 5.4.9 (latest stable) and Contact Form 7. This guide is written for Noiz hosting and is kept current against both plugins. It complements, and does not replace, the official plugin documentation linked below.

Official Documentation Reference

Prerequisites

  • Administrator access to your WordPress dashboard.
  • Both All-In-One Security (AIOS) and Contact Form 7 installed and active.
  • Optional, for diagnosis: the ability to enable WP_DEBUG in wp-config.php.

Why the form hangs

Contact Form 7 submits messages through the WordPress REST API rather than a classic form post. When AIOS has Disallow unauthorized REST requests switched on, it only allows REST calls from logged-in users. A visitor filling in your contact form is not logged in, so their submission is blocked before it reaches the form handler. The button keeps spinning and the message is never delivered.

  • The error is hidden. Current AIOS versions reject the blocked call with a 403 response, which the form does not surface to the visitor. On the front end the form simply appears stuck.
  • Turn on debugging to confirm it. Set WP_DEBUG to true in wp-config.php and reproduce the submission. The blocked REST request (often recorded as a 500 in the PHP error log) confirms the REST API restriction is the culprit rather than a mail or SMTP fault.

Two ways to fix it

Both fixes live on the same AIOS screen. In your WordPress dashboard, go to WP Security > Firewall, open the PHP rules tab, then choose WP REST API from the Rules list on the left. The two controls you need are on this page.

AIOS Firewall PHP rules tab showing the WP REST API settings page, with the Disallow unauthorized REST requests toggle at the top and a Whitelist REST routes list that includes a contact-form-7 entry.

1. Whitelist the Contact Form 7 route (recommended)

This is the safer fix because it keeps the REST API firewall switched on and only permits the one route your contact form needs. Contact Form 7 registers its own REST route, so it appears automatically in the AIOS list as contact-form-7; you do not add it by hand.

  1. On the WP REST API page, scroll to the Whitelist REST routes section.
  2. Switch the contact-form-7 toggle on.
  3. Save your changes.
  4. Reload your site and submit the contact form to confirm the message now sends.

Whitelisting a route allows it for everyone, including logged-out visitors, which is exactly what a public contact form requires. Everything else stays protected by the firewall. If contact-form-7 is not listed, make sure the plugin is active and up to date, then reload the AIOS page so its routes are re-registered.

2. Turn off the REST API block (fallback, less secure)

If the whitelist option is unavailable or you need a quick fix, you can switch the firewall rule off entirely. This allows all REST requests again, so treat it as a fallback rather than the preferred option.

  1. On the same WP REST API page, find Disallow unauthorized REST requests.
  2. Switch it off so unauthorised REST access is no longer blocked.
  3. Save your changes.
  4. Test your contact form to confirm it is working again.

Verify the fix

After applying either fix, submit a real test message and confirm the success notice appears and the email arrives. If the form still hangs after whitelisting the route, check for a second security or firewall layer (for example a caching or bot-protection plugin) that may also be blocking REST calls, and confirm Contact Form 7 mail is configured correctly.

If your site runs on a Noiz managed WordPress or hosting plan, open a support ticket from your Noiz client area and the team can apply and verify this change for you.

  • 1 Users Found This Useful
  • wordpress, security
Was this answer helpful?

Related Articles

How to Log In to the WordPress Dashboard

WordPress runs a large share of the web, and almost everything you do with it starts in the admin...

How to Remove Sample Posts, Pages and Comments From WordPress

Every fresh WordPress installation ships with a small set of placeholder items: one sample post,...

How to Write and Publish Your First Blog Post in WordPress

Writing your first blog post is one of the more satisfying moments in setting up a new website....

How to Delete a Post in WordPress

Removing a post in WordPress is a two-stage job, and most people only ever do the first stage....

How to Bulk Delete Posts in WordPress

Deleting posts one at a time is fine for a handful. When you are clearing out a demo site,...