How to Fix WooCommerce Lost Password Redirects and Login Flow Conflicts

Realistic close-up of a login form with 404 error message representing a WooCommerce lost password redirect issue

When users can’t reset their passwords or are redirected incorrectly, it can destroy your conversion funnel, frustrate wholesale customers, and flood your support inbox. If you’re using plugins like Approve New User, custom login pages via Elementor, and WooCommerce wholesale workflows — small misconfigurations can break the login-reset flow entirely.

This guide walks through the exact problem we solved on a live WooCommerce site in June 2025 — and expands it with a complete troubleshooting checklist based on best practices.

Common Symptom

  • Clicking “Lost Password” on the login page redirects to the homepage or throws an error.
  • Wholesale users can’t reset passwords even after being approved.
  • Password reset email never arrives.

1. Correct the Login Redirect Logic

The following redirect logic was used to forward users from the default wp-login.php to a custom /wholesale-login/ page. But it caused issues because it blocked password reset actions:


1function redirect_login_page_to_custom() {
2    if (is_user_logged_in() && current_user_can('manage_options')) {
3        return; // Don’t redirect admins
4    }
5    $login_page = home_url('/wholesale-login/');
6    $page_viewed = basename($_SERVER['REQUEST_URI']);
7    $action = isset($_GET['action']) ? $_GET['action'] : '';
8    $allowed_actions = ['lostpassword', 'resetpass', 'rp', 'retrievepassword'];
9    if (
10        $page_viewed === 'wp-login.php' &&
11        $_SERVER['REQUEST_METHOD'] === 'GET' &&
12        !in_array($action, $allowed_actions)
13    ) {
14        wp_redirect($login_page);
15        exit;
16    }
17}
18add_action('init', 'redirect_login_page_to_custom');
  

This allows WooCommerce’s lost password workflow to function without interference.

2. Set the Correct WooCommerce Pages

Go to WooCommerce > Settings > Advanced:

My Account Page: Set to your main /account/ or /my-account/ page.

Lost Password Endpoint: Should be set to lost-password (or match your Elementor settings).

Tip: The page must contain [woocommerce_my_account] shortcode or an Elementor login form with proper settings.

3. Check Elementor Login Widget Settings

Under Content > General, verify:

Redirect for Logged-in Users: Points to your /account/ page.

Custom Lost Password URL: Points to /account/lost-password/

Make sure this URL exists and matches your WooCommerce endpoint setup.

4. Check Plugin Conflicts (especially Approve New User)

The Approve New User plugin doesn’t interfere with password reset — because it acts during login, not when sending reset emails. But make sure:

  • User is approved before testing.
  • Email from WooCommerce can send through your SMTP provider.

5. Email Deliverability Troubleshooting

  • Confirm you receive the WooCommerce reset email.
  • If not, install an SMTP plugin (like WP Mail SMTP) and test sending email.
  • Check spam folder — WooCommerce uses default PHP mail unless overridden.

Ensure URL Parameters Aren’t Stripped

WooCommerce password reset links include unique URL parameters like:

https://yoursite.com/my-account/lost-password/?key=abc123&id=789

These parameters (key and id) are essential for verifying and resetting the user’s password. If these are missing or stripped by a caching plugin, redirect rule, or security feature, the reset link won’t work — users will see an error like:

❌ “Invalid reset key” or “This link has expired.”

How to test it:

  1. Send yourself a password reset email from your site.
  2. Open the link in a private/incognito window.
  3. Look in the address bar — you should still see ?key=…&id=… at the end.
  4. If the link redirects and those parameters disappear, you likely have a plugin, redirect, or caching conflict to fix.

Troubleshooting Tips:

  • Exclude /my-account/* or /account/* from page caching in LiteSpeed, Cloudflare, or WP Rocket.
  • Check .htaccess or any redirect plugins for over-aggressive rewrites.
  • Don’t modify WooCommerce reset links in your theme.

Bonus: Full Troubleshooting Checklist

  1. Verify WooCommerce Settings
    • My Account Page
    • Lost Password Endpoint
  2. Test Plugin Conflicts
    • Temporarily disable all plugins but WooCommerce
    • Switch to default Storefront theme
  3. Check Caching Conflicts
    • Bypass caching for /account/* and /wp-login.php* if using LiteSpeed or Cloudflare
  4. Ensure URL Parameters Pass
    • Password reset links use ?key=…&id=…
    • Make sure these aren’t stripped or redirected
  5. Confirm Email Flow
    • Test with tools like MailHog or WP Mail Logging
  6. Review Logs
    • WooCommerce > Status > Logs → Check for fatal errors
  7. Use a Staging Site
    • Safely test plugins, redirects, and themes without breaking production

Final Result (Live Site Fix)

After applying these steps:

  • Wholesale customers could successfully use the Forgot Password function
  • Reset links emailed and landed on the correct custom reset page
  • Login and redirection flowed properly

Conclusion

If your WooCommerce login and password reset flow is broken, custom redirects and missing endpoint configuration are the likely culprits. This guide walks through a real-world solution for WooCommerce, Elementor, and wholesale approval workflows — now documented for future reference.

Want help fixing this on your store? Or documenting your own fixes for SEO content? Let’s talk.

FAQs

Q1: Why does my WooCommerce lost password link redirect to the homepage?
A common cause is a custom redirect function or plugin that overrides wp-login.php without allowing WooCommerce’s lost password actions like resetpass or lostpassword.

Q2: What should my WooCommerce lost password endpoint be?
By default, it should be lost-password, but it must match the URL in your Elementor login widget or WooCommerce page setup.

Q3: Why isn’t my password reset email sending?
Most often it’s an email deliverability issue. Use an SMTP plugin like WP Mail SMTP to ensure emails are sent properly and not marked as spam.

Q4: Can Elementor interfere with WooCommerce login or reset flows?
Yes, if your Elementor login widget has mismatched URLs or redirects enabled, it can interfere with WooCommerce’s expected flow.

Q5: How do I safely test login changes without breaking my site?
Use a staging environment with a tool like WP Staging, and test all login, logout, and reset flows while monitoring WooCommerce logs.

Table of Contents