Captcha is not working

If you are using a Captcha solution on your website, and it has stopped working when WP Rocket is enabled, there could be two possible reasons:

  • Conflict with File Optimization features.

Verify this by disabling all the options on the File Optimization tab. If the issue is resolved, follow the troubleshooting process described here: My Site Is Broken.

  • Captcha is not compatible with page caching.

Verify this by comparing the cached and non-cached pages. You can view a non-cached page by adding /?nowprocket to the URL.

The verification question or image will be different:

Refresh both pages. The cached page will have the same verification question, but the non-cached page will have it updated.

This happens because page caching eliminates all PHP/MySQL processes from a page and creates static HTML output instead. In order for the captcha to be compatible with page caching, it must rely on AJAX (JavaScript) method.

Solutions:

  • use a captcha solution that is compatible with page caching, like, for example, Google reCaptcha.
  • exclude affected pages from caching: Exclude Pages from the Cache. For example, a page with a contact form with captcha can be excluded.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.