Apps Ballance Chat Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Link Lock Log_Out Map Marketing Mobile_UI Navigation Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

How to Redirect Users after Successful Login in WordPress

Iain Published on April 15, 2021

One of the most common questions that I get asked when setting up a WordPress membership site is, “How do I redirect members to my homepage instead of the admin dashboard after they log in?” 

For some reason or another, this has yet to become a default setting on WordPress despite a lot of people wanting this feature. 

If you have a membership site, even an eCommerce site, or LMS, you’d want to have control over where your users get redirected to after they log in. An added bonus would be to have a feature where you can control this based on user roles.

But fear not, we’ve got you covered with a solution.

As with anything WordPress, we turn to plugins to solve our problem, and WP User Manager is just the plugin for the job.

Why Do I Need to Redirect?

Control. Simple enough, really. You’d want to have control over where your users are redirected to after they log in. 

The default WordPress behaviour of redirecting your users to the admin dashboard, albeit lacking some options based on their user roles, can get a bit confusing to certain users. 

If you run a membership site, ideally, you’d want your members to be redirected to their Profile Section. 

For an LMS, the best option would be to redirect them to their current courses. For an eCommerce website, the cart page or the main shop page would be good options. 

For whatever purpose or whatever reason you have, having a redirection in place for when users log in is one sure-fire way to have a better user experience when using your website. 

Just think of all the support questions you’d get to avoid.

How Do I Redirect a User After Logging in to WordPress

Now for the important question. How. How do we make this happen? 

As mentioned, the ability to control redirection after logging in isn’t currently built into WordPress. However, there are several plugins that you can use to achieve this feature. WP User Manager is our best bet. It has a built-in feature to control redirections. Whether it be for after they log in, after they log out, or even after registration.

After installing the WP User Manager plugin, here’s how to set up custom redirects:

  1. From the WordPress Admin Dashboard, navigate to Users > Settings
  2. Click on the “Redirects” Tab

And from here you have the option to set where the users get redirected to after they log in, log out, or register. 

Simply select the page from the drop-down, hit “Save Changes” and you’re good to go.

Here’s a quick Documentation guide from WP User Manager, in case you want to read more about login redirects with their plugin. 

If you’ve tinkered around WP User Manager much and set up your own login and registration forms, you’ll know that there’s a difference between the wp-login.php log-in and your custom login form.
You’d still be able to have your users log in either way, but if you restrict the wp-login.php login page to certain user roles only, you can also set Backend Redirects from this settings page. 

It means you can set a different redirection path for those who log in via the back end wp-login.php as opposed to when they log in via the login page you just created. 

Do take note that you have to have the page already created before you can set users to be redirected to that page.

Custom Registration Forms and Other Useful Features of WP User Manager

WP User Manager not only offers you the ability to add custom redirects for when users log in, log out, or register, but you also get tons more features.

You have the ability to add custom roles with their Role Editor, Create custom registration forms, be able to add a registration and login form wherever via a shortcode, use custom fields on the registration form and so much more. 

WP User Manager is one of the easiest ways to get started with a membership platform on your WordPress site. 

It also works seamlessly with a lot of other plugins to help you out with managing your users and their access. You can set it up to restrict specific content from specific users, have a verification process in place, and even harden your site security with its list of useful addons.

Wrapping Up

Taking control over your own site and the user experience is one that we need to learn to do. We can’t just serve out our website and let our users figure out a way to navigate it. That simply wouldn’t work. 

For the sake of user experience, your website, whether it be a shop, a learning platform, a membership, or just a plain blog, has to be a guided experience. It must be intuitive enough that users don’t need to go back and forth just to get to the places they want to go to. 

That’s where custom redirections come in, and even more helpful is custom redirections after logging in and out. Since by default, it can be a little confusing for our users to figure out where to go next after they get that registration email from WordPress. 

Setting up custom redirections can make it easier for your users to know what to do and where to head off to next after they’ve logged in. 

Have any other tools that you use for login redirection? Let me know in the comments below.

Iain I’m a WordPress developer based on the south coast of England. I develop plugins like WP User Manager and Intagrate. I also run Plugin Rank to help WordPress plugin developers track their rankings in WordPress search results.
Comments