View Categories

How to Redirect Users After Logout in WordPress?

Learn how to redirect users to specific pages after they log out of your WordPress site using the User Registration & Membership plugin. This guide covers both free and premium features with step-by-step instructions.

Prerequisites: 
✅ User Registration & Membership plugin installed and activated.
✅ Admin access to your WordPress site.

Method 1: Using Built-In Logout Redirect Setting in Form Options #

You can easily redirect users to a specific page after logout using the built-in setting available in the Login Form options. No custom code is required.

Steps to Set Redirect After Logout

  1. Go to User Registration & Membership → Login Form
  2. Click on the Login Form to edit it
  3. Navigate to Form Settings → Advanced
  4. Enable the Enable Custom Redirect option
  5. Under Redirect After Logout, choose your preferred option:
    • No Redirection – Users will remain on the default page after logout.
    • Internal Page – Redirect users to a specific page from your website.
    • External URL – Redirect users to a custom external link (you need to enter the full URL).
    • Previous Page – Redirect users back to the page they were on before logging out.
    • Role Base Redirection – Redirect users to different pages after logout based on their user role.
  6. Click Update Form to save the changes

Users will now be redirected to the selected page or URL after logging out.

Method 2: Using Login Form Block #

WordPress Block Editor users can utilize the Login Form for logout redirections with a visual interface. This block is offered by the User Registration & Membership plugin.

Adding the Login Block #

  1. Navigate to the page where you want to add the login form.
  2. Click “Add Block” (+).
  3. Search for the Login Form” block and insert the block.
Login Form Block

Configuring Login Form Block Settings #

With the login block selected, look for the block settings panel on the right side of your screen.

Login Block Redirection Example

In the block settings panel, configure:

  • Redirect URL: You can specify where users should be redirected after successful login from here. So, enter your target URL.
  • Logout URL: Set the place where users are redirected after logging out.
  • User State: Specifies how the block will be displayed based on the user’s login status:
    • Logged In: Might show account info or a logout option.
    • Logged Out: Shows the login form.

Similar to Method 1, you can also test the configuration for this method.

Method 3: Using My Account Block #

The My Account Block by User Registration & Membership offers complete account management functionality, including the ability to set logout redirect destinations.

Adding the My Account Block #

  1. On your My Account page, click on Block inserter [+].
  2. Search for the “My Account” block and insert it.
Add My Account Block

Configuring Logout Redirect Settings for My Account Block #

Click on the My Account block, and you’ll see the block settings panel on the right:

  • Redirect URL: Enter where users should go after logging into your site.
  • Logout URL: Enter the URL where you want to redirect the user after they log out.
  • User State: It shows the preview of your My Account page in Logged Out or Logged In State.
My Account Block Settings

Click “Save” to update the page settings. Like the above section, you can also perform the test for this configuration.

  1. How do you redirect the user to a specific page after login?
  2. User Registration & Membership Pro Guide.

Powered by BetterDocs

Scroll to top