Want users redirected to other pages after logging in? Perhaps you want specific user roles to access a specific URL. In any case, it’s not all that difficult to redirect users of WordPress after a login.
Why is redirecting important? In reality, it helps streamline the user experience. For example, you may have user-role-specific pages or posts on your website. Using a redirect on login will send those users to the specific pages immediately.
Perhaps you custom roles for paid content. Maybe you created private posts and want users to be redirected to that particular category. There is a lot you can do to control user interaction when logging into the system.
Today, I’m going to show you how to redirect users in WordPress after a successful login. With a simple plugin, you have quite a bit of control over who does what on your website.
Using Peter’s Login Redirect Plugin
In this tutorial, I’ll demonstrate a bit of what Peter’s Login Redirect plugin can offer. It has several options available and is flexible in regards to what you’re trying to accomplish. Whether it’s a redirect after login or user registration, this tool handles quite a bit.
Install and activate, “Peter’s Login Redirect.”
Go to Settings and click, “Login/logout redirects.”
As you can see, this plugin handles five different types of logins. It also has a few customization settings I’ll cover in a moment.
Let’s take a look at each one.
All of these roles have sections for “URL” and “Logout URL.” This is where you place the web address of the page you want to redirect users. For instance, you can set a WordPress login to redirect to the homepage by typing: “http://www.YourHomePage.com” in either of these areas.
Of course you want to change the “YourHomePage” portion with your domain name.
The Specific Users setting controls how one person logs in. This is useful if you only have a handful of people who need to access a specific page after logging in.
The drop down window expands a list of all active users in your WordPress website. Assign the URLs and click the “Add username rule” to save the setting.
Specific roles redirects users according to their “roles” in WordPress. This supports custom roles you create with other plugins. For instance, you can redirect authors to one URL and admins to another.
For example, you can send paid subscribers or customers to certain areas of the website after logging in.
In Specific Levels, you can assign redirects based on permission levels given to users. This is more in-depth and requires a bit of knowledge about how to change user levels and permissions.
This is useful when you want certain permissions to access a page but don’t want the user to have specific roles. For instance, what if you want someone to have a specific editor ability without actually making him or her an editor?
All Other Users
Peter’s Login Redirect also allows you to control other users outside of the settings above. For instance, you can set certain rules for editors and admins while redirecting everyone else to another page.
This is really an optional setting since you don’t have to redirect anyone if you choose not to. However, the option is available if you want WordPress to redirect after a login.
Input a URL in this section to redirect users after they register for an account.
This could be to something like a “Thank you” page or a landing page for a discounted product. It can work well as a marketing device as you give users a reason for registering on your website.
Customize Plugin Settings
In this section, you can set restrictions, permission levels required to edit redirects and change how WordPress variables are handled. Use Customize Plugin Settings for advanced changes in how the plugin works.
Unless you absolutely know what you’re doing in this section, it’s probably best to leave it as default settings.
Redirect to Streamline the Website
Redirecting users in WordPress after a login has potential to boost productivity and interest in the site’s content. There are a number of possibilities whether it’s a reward for registering or putting authors directly in front of resources before writing. It all depends on your ideas of an efficient website.
What plugins do you use to boost the productivity of your content? How often do you assign new user roles to people on your website?