LTD is back · Limited time only

How to Redirect Users After They Log Out of WooCommerce

Last updated on August 7, 2026

Key Takeaways

• Redirect users to a chosen page right after logout

• Send them to the login page or a custom URL

• Choose the destination from the settings

• Provides a clear logout hand-off

• Confirmed to run on the logout action

What Does the Feature Do?

After a user logs out, WordPress usually leaves them where they were or returns to a default location. The Redirect After Logout feature sends them to a chosen destination immediately on logout, such as the login page or a custom URL.

The destination is configurable, and a custom URL lets you send users anywhere you choose.

Why You Need It

A clear logout destination improves the flow:

  • Users get clear confirmation that they logged out
  • They are not left on a page that requires authentication
  • A login destination lets them sign back in cleanly
  • A custom URL allows a specific next step

How to Redirect After Logout

Step 1: Enable the Feature

  1. In WordPress admin, open Classic Monks > WooCommerce.
  2. Open the Redirection settings area.
  3. Toggle on Redirect After Logout.

WooCommerce redirection settings enabled.

Step 2: Choose the Destination

  • Redirect Page: pick the login page, a specific page, or Custom.
  • If you choose Custom, enter a Custom URL.

Step 3: Save and Test

Click Save Changes. Log in, log out, and confirm you land on the destination you chose.

Configuration Options

Option Behavior Default
Redirect After Logout Master toggle. Off
Redirect Page Login, a selected page, or Custom. Login
Custom URL Destination when Redirect Page is set to Custom. Blank

What Gets Affected

  • The logout flow: users are redirected to the chosen destination on logout

What Does NOT Get Affected

  • The login process: unchanged
  • The account dashboard: it is not the default target unless you select it
  • Browser cookies and sessions: cleared normally on logout

Advanced Options (Developers)

The feature registers one hook in functions/woocommerce/woocommerce-functions.php:

add_action( 'wp_logout', 'cm_redirect_after_logout_action' );

wp_logout calls cm_redirect_after_logout_action(), which reads the configured destination (login or custom URL) and performs a safe redirect after the user logs out.

Common Use Cases

Shared devices. Sending users back to the login page on shared computers encourages a clean hand-off.

Clear confirmation. A login destination tells users the logout worked.

Specific next steps. A custom URL can route logged-out users to a landing page or promotion.

Keeping It Set Up

Set the toggle once and it stays active across the site. To change behavior, return to the WooCommerce settings, adjust the option, and save again. The store continues to run normally throughout, and you can turn the feature off at any time to restore the previous default behavior. For teams managing multiple environments, confirm the setting on staging first, then apply it to production and verify a real page load before treating it as live.

Troubleshooting

Cause: The toggle is off, or the logout was triggered by a non-standard mechanism.
Fix: Confirm the toggle is on. Test logout with the standard logout link, since the redirect runs on the WordPress logout action.

Cause: The destination setting points somewhere unexpected.
Fix: Review Redirect Page and, if Custom, the Custom URL. Save and test again.

Cause: Not every page may appear in the selector.
Fix: Use the Custom destination with a Custom URL.

Frequently Asked Questions

Immediately on logout, when the user triggers the WordPress logout action.

To the destination you choose: the login page, a specific page, or a custom URL.

No. The redirect runs only on logout.

Yes. Set Redirect Page to Custom and enter the Custom URL.

Sumit Your Ideas or Feature Requests

All submissions go through a manual review, so not every idea will be published. That said, the most upvoted ideas are given priority on our official roadmap.Please check if your idea already exists before submitting. If you find it, simply upvote it to help us prioritize it.