Table of Contents
If you own a WordPress site that allows front-end user registration, you’re probably looking for an easy way to set up the WordPress redirect user after login or registration functionality. Not only does this let you keep users out of the WordPress dashboard, but it also enables you to send them straight to a specific page that you’ve optimized for them. Setting up a WordPress login redirect is also a great way to enhance user experience.
Using the complete Custom Redirects add-on in the Profile Builder plugin, you can easily set up a custom WordPress redirect after login, as well as login redirect for several other situations.
So, if you’re wondering how to redirect users, you’ve come to the right place!
In this tutorial, we’ll go through all the different types of WordPress custom redirects you can set up with this redirect plugin module.
Why redirect users after login into WordPress?
Many times, WordPress site owners run multi-user websites that require different people to log in and perform various tasks. For example, if you’re running a blog or magazine site, you might need authors, contributors, and editors to log in with their user accounts. Similarly, if you’re running a membership site, then you’ll have trainers and students logging in to manage the website and access exclusive content.
Setting up custom user redirect after login in WordPress ensures that people are redirected to the correct pages after they’ve successfully logged in to their user accounts. This way, they aren’t redirected to the default WordPress admin area, which delivers poor user experience.
You can create user-role specific pages and keep unauthorized users out of the WordPress dashboard by redirecting users after login. This way, you can rest assured that clients and customers don’t end up on the WordPress back-end. Instead, you can keep them on your site’s front-end.
WordPress redirect users after registration
And since we’re on the topic, let’s take it a step even further. Besides the login redirect, you can also benefit from redirecting users after registration as well.
This way you can send your visitors to a specific page right after they complete the registration process on your website. Maybe you want to take them to a dedicated page that thanks them for their registration or maybe you want to send them straight to their account page. Whatever you choose, the Custom Redirects add-on can help you implement it fast and easy.
What is the Profile Builder plugin?
If you’re not familiar with the Profile Builder WordPress plugin, it’s an easy-to-use plugin that lets you improve all aspects of your WordPress login and registration process. The plugin also works on WooCommerce stores, letting you set up login redirects.
You can create custom registration forms to collect additional information about your visitors, as well as front-end profile editing pages so that users can manage their profiles. You can also create a custom login page at a custom URL on your site.
And, with the Custom Redirects add-on, you can also easily set up a WordPress login redirect after successful login. The best part is that you don’t have to mess around with any code, it’s all done using an intuitive interface.
Profile Builder Pro
Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.
Get Profile BuilderOnce you install and activate the Profile Builder plugin just like any normal plugin, you’ll have to enable the Custom Redirects add-on on your WordPress website. Go to Profile Builder → Add-ons and click the Activate button next to the Custom Redirects add-on.
you can set up the WordPress user redirect after login functionality by going to Profile Builder → Custom Redirects from the WordPress admin dashboard:
Now, let’s cover the different types of WordPress redirects your can set up.
Types of WordPress User Redirects in Profile Builder
Now, you might be wondering how to redirect users after login. The Custom Redirects add-on in Profile Builder Pro gives you several redirection methods for various user actions related to login and registration.
Here’s a quick breakdown of the different options available to you:
- After Login – redirect users to a custom redirect URL after successful login.
- After Logout – create a logout redirect to a custom URL when they log out.
- After Registration – redirect users after successful front-end registration by a new user.
- Dashboard – redirect users when trying to access the WordPress dashboard.
- After Edit Profile – redirect users to a custom page after they’ve edited their front-end user profile.
- After Password Reset – users should redirect to the selected page after they have successfully changed their password.
- After Email Confirmation – users should redirect to the selected page after confirming their email address.
Now that we listed the type of user actions where we can apply our custom redirects, we’ll look into how to use redirect rules to target only certain users, based on redirect filters like user role, username, or user ID.
WordPress Redirect After Login Based on Username or User ID
One of the most focused types of user redirects is when you need to target only a specific username or particular user IDs.
Under Custom Redirects → Individual User Redirects, you’ll be able to select which users are redirected to which link after a certain action. You can target a specific user by entering his username or user ID. This is great for websites that have a handful of users they’d like to redirect to a different page.
WordPress Redirect After Login Based on User Role
Let’s say you have a registration form where users can select their user role (using the User Role Select field), and you want users with different roles to be taken to different pages after registration.
Or, in case you allow users to sign up for paid accounts using Paid Member Subscriptions in combination with Profile Builder, they will automatically get the user role of the selected subscription plan at registration. This means users selecting different plans will have different user roles.
By setting up custom redirects based on user role, you can choose where to redirect users based on which membership plan they applied for at registration. For example, you might want to redirect users who signed up for the Bronze plan to the Bronze Members landing page and users who signed up for the Gold plan to the Gold Members landing page.
As you can imagine, the use cases for redirecting users based on user roles are countless. And, with the Profile Builder Pro plugin, you can do this without adding code to your functions.php file. The plugin also works seamlessly with WooCommerce.
Global WordPress Redirects
These redirect rules are applied globally, when there are no other more specific redirect rules defined, like redirects based on username or user role.
Redirect Users on Default WordPress Pages
Besides the front-end user redirects listed above, you’ll probably want to keep your users from seeing or accessing the (back-end) default WordPress pages like:
- Login (wp-login.php) – redirect users to the front-end login form created with Profile Builder;
- Register (wp-login.php?action=register) – redirect users to the front-end Profile Builder register form;
- Lost Password (wp-login.php?action=lostpassword) – redirect users to the front-end lost password form;
- Author Archive (http://sitename.com/author/admin) – this has been a common request from Profile Builder users, to be able to redirect people trying to access an author archive to that author profile page, basically the single user listing template.
The Custom Redirects add-on from Profile Builder also has a list of available tags that can be used for creating dynamic URLs. Here are some of the available tags you can use to create dynamic URLs to redirect users to after successful login:
- {{homeurl}} – generates a URL of the current website homepage.
- {{siteurl}} – in WordPress the site URL can be different than the home URL.
- {{user_id}} – the ID of the user.
- {{user_nicename}} – the URL sanitized version of the username, the user nice name, can be safely used in URLs since it can’t contain special characters or spaces.
- {{http_referer}} – the URL of the previously visited page.
Custom Redirects Priority
You might be wondering how the redirect priorities are handled. Which redirect happens depends on the following priority:
- Individual User Redirects
- User Role based Redirects
- Global Redirects
- Individual redirects defined in shortcodes or in the Multiple Registration and Edit Profile form settings. (redirect_priority=”top” parameter can be added in any shortcode, then that shortcode redirect will have priority over all other redirects)
Set Up WordPress Redirect After Login Functionality Today
With Profile Builder Pro and the Custom Redirects add-on, you can easily set up the WordPress redirect user after login functionality or WooCommerce redirect after log in along with detailed redirect rules for specific usernames, user roles, and more.
To get started, purchase Profile Builder Pro and start setting up redirect after login WordPress for various user actions.
Profile Builder Pro
Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.
Get Profile BuilderRelated: Manage WooCommerce Customer Fields with Profile Builder
Related Articles
Profile Builder Update: No More Profile Builder Hobbyist?
If you’re already a Profile Builder user, you might have noticed some changes around here in the past few weeks. And that’s especially if you’ve purchased the Hobbyist version of Profile Builder. And you’d be right! Some changes did take place within the plugin, and thus, that’s what we’ll talk about in this blog post, […]
Continue ReadingHow to Build Online Communities Using Profile Builder & BuddyPress
Building a WordPress community website can be a great idea not only because you can control the experience of the user, manage SEO and inbound traffic, but also because I think a community is more about nurturing a constant, active presence and happy experience. If we speak about the integration between our Profile Builder & […]
Continue ReadingHow To Extend bbPress User Profiles with Profile Builder
Letting users customize their profiles is a great way to encourage them to spend more time on your forum website and interact with each other. However, this is not a feature either WordPress or bbPress offers by default. WordPress supports user registration, but provides very little functionality in terms of profile customization. Fortunately, there are […]
Continue Reading