Your customer forgets their password, clicks the "Lost your password?" link on the WooCommerce My Account page, and enters their email. They receive the reset link, click it, type a brand new password, and hit save. But instead of logging them in, the page refreshes, and they are thrown back to a blank login form with no success message. When they try their new password, it fails. They are trapped in a password reset loop.
This user-experience bug is almost exclusively caused by a structural conflict between WordPress security nonces and page caching. When a user lands on the password reset form, WooCommerce generates a unique hidden security token called a "nonce" to prevent cross-site scripting attacks. If your web server caches the password reset page, the same expired or invalid nonce is given to every single user who attempts to reset their credentials. The server rejects the form submission as a potential security breach, quietly discarding the new password without throwing a descriptive error message on the frontend.
The Solution
Breaking the password reset loop requires excluding specific dynamic parameters from your caching setup and verifying your login URLs.
-
Bypass Caching on Query Strings: Open your optimization plugin (e.g., LiteSpeed Cache or WP Rocket). Look for settings related to dropping cache for specific parameters. Exclude the following query strings from caching entirely:
Plaintextlost-password reset-link -
Check Permalinks Structure: Go to Settings > Permalinks in WordPress. Ensure your permalinks are not set to "Plain". Choose Post name and click save twice. This flushes the virtual
.htaccessrouting rules and ensures WooCommerce account endpoints map correctly. -
Enforce Dynamic Logout/Login Handling: If you use a custom theme, ensure that the login forms use standard WooCommerce hooks. You can force the account page to remain uncached by adding this PHP rule for specific hosting environments (like WPEngine or Kinsta) through your configuration panel:
Note: Exclude cookie paths starting with
wp-resetpass-to guarantee unique browser session handling during the credential recovery phase.
