WordPress login & onboarding

Stop sending customers to a dashboard they'll never use

Redirect After Login sends each role to a page or URL of your choosing right after they sign in, instead of WordPress's one-size-fits-all dashboard — with a genuine multi-role resolution that works for custom roles too, not just the five built-in ones.

  • A different destination per role, page or custom URL.
  • The most privileged role wins automatically for multi-role users.
  • Works correctly for custom roles, not a hardcoded hierarchy.
  • Overrides any requested deep-link redirect by design.
Per-Role DestinationsRedirect After Login

Administrator

PageCustom URL
— Select a page —

Editor

PageCustom URL
— Select a page —

Author

PageCustom URL
/account
Most privileged role wins automaticallyWorks for custom roles too, no hardcoded hierarchy.
Active
Quick answer

What does Redirect After Login do?

When the redirect_after_login module is active, TOWP_Redirect_After_Login hooks WordPress's own login_redirect filter to send a signed-in user to a specific page or URL based on their role, instead of the default dashboard. If a user holds several roles with different destinations configured, the module ranks each role by how many capabilities it actually grants and picks the most privileged one, working correctly for custom roles created through Role Manager, not just WordPress's five built-in roles. Since the configured destination always takes priority over any requested redirect_to, such as a "log in to view this page" deep link, the redirect behaves consistently regardless of how the user arrived at the login screen.

The "one dashboard for everyone" problem

WordPress sends every role to the same place

Since every role lands in the same spot after logging in, most sites carry this mismatch without anyone actually choosing it.

The dashboard is the right destination for almost nobody

WordPress sends everybody who signs in to the dashboard, which suits whoever maintains the site and makes little sense for a customer, a member, or a contributor who only ever writes.

Every role lands on a screen full of things it can't use

A role without the capability to touch most of what's on the dashboard still gets shown all of it, adding a step and some confusion before they reach wherever they actually meant to go.

A dedicated WordPress solution

Each role, sent exactly where it should land

The module replaces the single default destination with a choice per role, resolved correctly even when someone holds more than one.

A page or URL, chosen per role

Pick a specific page from the site or a custom URL for each role, matching where that role actually needs to be after signing in.

Multi-role users resolved automatically

When a user holds several roles with different destinations, the one granting the most capabilities wins, computed dynamically rather than looked up from a fixed list.

Works for custom roles too

Since the priority is based on actual capability count rather than a hardcoded hierarchy, a custom role created through Role Manager gets ranked correctly alongside the built-in five.

Verified feature set

A real algorithm, not a fixed list

Every capability below is present in the supplied PHP class and its settings registration.

Per-role destination, Page or URL

Two ways to point a role somewhere

Each role can be sent to a page selected from the site, or to any custom URL, matching the segmented control on the settings screen.

Page or Custom URLIndependently configured per role
Dynamic capability-based priority

No hardcoded role hierarchy

The most privileged role among several is determined by counting how many capabilities it actually grants, with ties broken alphabetically for a consistent result.

Capability count rankingDeterministic tie-breaking
Published-page validation

A deleted or unpublished page is skipped, not broken

Before using a configured page, the module confirms it's still a published page; if not, that role's destination is silently skipped rather than pointing somewhere broken.

get_post_status checkNo dead-link redirects
External URLs actually work

A real fix for a real wp_safe_redirect() limitation

Since wp-login.php's own redirect function blocks external hosts by default, the module explicitly whitelists the host of every configured Custom URL so an external destination doesn't silently fall back to the dashboard.

allowed_redirect_hostsPrevents silent fallback
Deep-link requests are overridden by design

The configured destination always wins

A role's configured redirect takes priority over any requested redirect_to, such as someone returning to a page they tried to view before logging in.

login_redirect priority 20Intentional override
Practical use cases

Where per-role redirects help most

The module supports any site where the dashboard isn't the right destination for every role.

Membership sites and shops with customer accounts

Send customers straight to their account page or order history instead of a dashboard meant for site staff.

Community sites with contributor-only roles

Send a Contributor straight to their draft list, skipping a dashboard full of controls they can't use anyway.

Client sites with several distinct staff roles

Give each role, editorial, support, or otherwise, a landing page that actually matches what they're there to do.

Operational benefits

The right landing spot, resolved correctly every time

The module combines a real UX improvement with a resolution algorithm that holds up for multi-role users and custom roles alike.

One fewer step for every role but the ones that need the dashboardA role that never touches the dashboard skips it entirely, landing directly on the screen relevant to them.
Multi-role users still get exactly one, correct destinationInstead of an arbitrary or blank result, a user with several roles ends up wherever the most privileged of them is configured to go.
External destinations work reliablyThe host-whitelisting fix means a Custom URL destination actually redirects there, instead of silently falling back to the dashboard.
No broken redirects from a deleted pageA page that's been unpublished or removed gets skipped automatically, rather than sending someone to a 404.
Performance behaviour

One check, exactly once per login

The verified implementation adds no ongoing cost outside the moment of signing in.

One filter check per login

The redirect decision runs once, at the moment of a successful login, adding no ongoing overhead anywhere else.

No effect on roles with nothing configured

A role with no destination set simply falls through to WordPress's own default behavior.

A lightweight capability count, not a database-heavy lookup

Ranking roles by privilege reads each role's already-loaded capability list; it doesn't add any extra queries.

Security implementation

Navigation only, validated before use

The code changes where a role lands, never what that role is actually able to do.

01

A navigation setting, not an access control

This module only changes where a role lands after logging in; it has no effect on what that role can actually see or do once there.

02

External redirects are explicitly whitelisted, not opened broadly

Only the hosts of destinations actually configured in the settings get added to the allowed list, not an open pass for any external URL.

03

A page destination is validated before use

The module confirms a configured page is genuinely published before redirecting there, avoiding a dead link from an outdated setting.

04

Configuration requires the same access as any other setting

Setting a role's destination happens through the standard TheOneWP settings screen, available only to an administrator.

Verified compatibility

Built directly around WordPress's own login redirect system

The supplied code integrates through APIs present in WordPress core; this page makes no compatibility claim beyond the verified implementation.

Post-login redirect

login_redirect filter

The native WordPress filter that determines where a user goes immediately after a successful login.

login_redirectNative WordPress filter
External redirect safety

allowed_redirect_hosts filter

The native WordPress filter used to permit wp_safe_redirect() to send someone to an external host when explicitly configured.

allowed_redirect_hostsNative filter
A separate system from Redirect Manager

Not the same as TOWP_Redirect_Manager

This module handles post-login navigation specifically; general front-end URL redirects are handled by a separate, unrelated system.

Distinct from Redirect ManagerLogin-specific scope
Solution comparison

TheOneWP versus common alternatives

Compare the verified Redirect After Login implementation with a typical hardcoded-hierarchy approach.

CapabilityTheOneWP Redirect After LoginOther common solutions
Multi-role resolution Ranked dynamically by actual capability countOften a hardcoded hierarchy limited to the five built-in roles
Custom role support Works correctly without any extra configurationCustom roles frequently fall through to a default or unranked behavior
External URL destinations Host explicitly whitelisted, so it actually redirects thereA common oversight leaves external redirects silently failing
Broken page destinations Validated as published before use, skipped if notSome approaches redirect to a 404 without checking
Deep-link priority The configured destination intentionally takes precedenceBehavior often undefined or inconsistent when a deep link is also present
Recommended workflow

Redirect every role in four steps

Test with a multi-role account before considering the setup finished.

01

Enable Redirect After Login

Activate the module from the TheOneWP Login settings tab.

02

Choose Page or Custom URL for each role that needs one

Configure a destination only for the roles where the dashboard isn't the right landing spot.

03

Select a page or enter a URL

Pick a published page from the site, or type in any custom address for that role.

04

Log in as each configured role to confirm

Sign in as a test account for each role and confirm the redirect lands where expected.

Best practices

Configure it where the dashboard genuinely isn't right

The setting is most useful applied selectively, not blanket-configured for every role.

01

Leave the dashboard as the default for roles that manage the site

Administrator and Editor typically still benefit from landing on the dashboard; configure destinations mainly for customer-facing or limited roles.

02

Keep multi-role priority in mind when testing

If a test account holds several roles, confirm the redirect matches the most privileged one, not just the role you expect.

03

Point to a stable page, not one likely to be unpublished

Since an unpublished page gets silently skipped, a role's destination should be a page that's meant to stay live.

04

Use Custom URL for anything outside the site itself

A Custom URL destination works for an external address too, as long as it's the one actually configured for that role.

Common mistakes

Avoid a couple of assumptions about how priority works

A few behaviors are worth understanding correctly the first time through.

Assuming a deep-link redirect will still work

The configured destination is designed to override any requested redirect_to; a role expecting to land back where they came from will go to the configured page instead.

Expecting the lowest-privilege role to win for a multi-role user

The most privileged role, not the first one configured or the lowest-privilege one, decides the destination when a user holds several roles.

Forgetting Custom URL needs the destination whitelisted automatically

The module handles whitelisting the host on its own; manually adding it elsewhere isn't necessary and won't be required for the redirect to work.

Frequently asked questions

Redirect After Login FAQ

These answers come directly from the verified class and its settings registration.

What does Redirect After Login do?

It sends each user to a specific page or URL, chosen per role, right after they sign in, instead of WordPress's default dashboard.

What happens if a user holds more than one role?

The role granting the most capabilities is used to decide the destination, computed dynamically rather than from a fixed list.

Does this work with custom roles, not just the built-in five?

Yes. Priority is based on how many capabilities a role actually grants, so a custom role gets ranked correctly alongside the default ones.

Does the configured destination override a "log in to view this page" redirect?

Yes. The configured destination is designed to take priority over any requested redirect_to.

What happens if the configured page gets deleted or unpublished?

That role's destination is silently skipped, since the module confirms a page is still published before using it.

Can a role be redirected to an external URL, not just a page on the site?

Yes. The module explicitly whitelists the host of any configured Custom URL so the redirect actually works.

Is this the same as the Redirect Manager module?

No. This module handles post-login navigation specifically; Redirect Manager is a separate, unrelated front-end redirect system.

What happens to a role with no destination configured?

Nothing changes; that role falls through to WordPress's own default login redirect behavior.

Does this affect what a role can actually do once logged in?

No. It only changes where they land immediately after signing in.

Who can configure a role's redirect destination?

Only an administrator with access to the TheOneWP settings screen.

Stop sending every role to the same dashboard.Send each one exactly where it should land.

Use Redirect After Login to send each role to its own page or URL after signing in, with multi-role users resolved correctly, even for custom roles.