Flexible WordPress login redirects
LoginWP PRO is a paid edition of LoginWP, formerly known as Peter’s Login Redirect, for directing users to the right destination after they log in or register. It helps site owners create redirect rules for individual users, users with specific roles, users with specific capabilities, and other users who do not match a more specific rule.
This approach is useful when different audiences need different destinations. For example, users with a particular role can be sent to a role-specific page, while selected users can receive their own redirect. You can also define a redirect URL for post-registration.
Dynamic destinations with URL placeholders
LoginWP supports placeholders that build a dynamic URL at login time. Available placeholders include {{username}}, {{user_slug}}, and {{website_url}}. These can help create destinations that reflect the logged-in user or the website address.
LoginWP PRO adds the {{current_page}} and {{previous_page}} placeholders. They allow users to return to the page they were logging in from or to the previous, or referrer, page after authentication. This is practical for sites where visitors begin a login process while viewing protected, account-related, or member-focused content.
Rules, custom logic, and integrations
The plugin lets you add your own code logic before and between its normal redirect checks. This provides a way to build custom conditions, including redirecting users according to their IP address or sending them to a special page on their first login.
The PRO edition also supports redirect workflows with a range of registration, login, membership, learning, and ecommerce plugins. Supported integrations include:
- Redirect After First Login
- WooCommerce, Easy Digital Downloads, and Restrict Content Pro
- Gravity Forms and WPForms
- LearnDash, Uncanny Toolkit, LifterLMS, Tutor LMS, LearnPress, and Paid Memberships Pro
- ProfilePress, MemberPress, MemberMouse, Ultimate Member, and WishList Member
- WP User Manager, WP User Frontend, Theme My Login, and User Registration by WPEverest
- Elementor, BuddyBoss Theme, and Divi Theme login or registration forms
Practical workflow
Start by identifying the users or conditions that need a dedicated destination. Create rules for specific users, roles, capabilities, or general unmatched users, then add a post-registration destination if required. Use the available placeholders when the destination needs to be generated dynamically.
For advanced workflows, add custom code logic between redirect checks. When using a supported integration, connect the relevant login or registration form so the redirect behavior matches the site’s user journey.
Installation and setup
Use LoginWP PRO with the WordPress login system and the supported login or registration plugins listed above. After adding the paid edition, configure the redirect rules and destinations in the plugin’s settings, then test each user, role, capability, and form scenario that your site uses.
LoginWP uses WordPress’s standard login_redirect hook. If redirects do not work, another plugin may be using the hook first, or a custom login form may not run through WordPress’s standard login functions.