Skip to content
GPLWP Guides

How to limit simultaneous member logins in WordPress

Security Time About 20–45 minutes 6 steps Updated 4 Oct 2026

SECURITY
The short answer

WordPress allows a user to stay logged in on several browsers and devices, but it has no built-in setting for a maximum. You need custom code or a session-management plugin to reject extra logins or remove older sessions. For membership sites, the plugin route is usually faster and easier to maintain.

The route
  1. 01Choose your session policy
  2. 02Know what WordPress provides
  3. 03Build the manual control
  4. 04Add a session-management plugin
  5. 05Configure the membership rule
  6. 06Test every login path

What you need

  • A WordPress membership site with administrator access
  • A recent backup of the site
  • Access to a staging site or a safe test account
  • The maximum number of simultaneous sessions you want to allow

Choose your session policy

Decide whether one member may use one session only, or whether you will allow two or three devices. Then choose what happens when the limit is reached: reject the new login, or end the oldest session.

Rejecting the new login is clearer for account-sharing prevention. Ending the oldest session is less frustrating for members who have forgotten to sign out elsewhere.

Know what WordPress provides

WordPress stores session tokens for each user and can list or destroy them. The core functions include wp_get_all_sessions(), wp_destroy_other_sessions(), and wp_destroy_all_sessions(), but WordPress does not provide a dashboard setting for a maximum number of active sessions.

Do not confuse this task with limiting failed login attempts. Brute-force protection counts incorrect passwords; simultaneous-login control counts active authenticated sessions.

Build the manual control

For a custom solution, create a small site plugin rather than editing the theme or WordPress core. Use the wp_authenticate_user filter to check the authenticated user before login completes, inspect that user's session tokens, and return a WP_Error when the allowed count has already been reached. WordPress documents this filter as the point for additional checks before a user is logged in.

If your rule ends the oldest session instead, run the session-removal logic after a successful login and retain the newly created session. Account for concurrent requests, custom login forms, REST or application-password access, and membership plugins that perform their own authentication. This route is workable, but it needs careful development and ongoing testing.

Add a session-management plugin

The faster route is a plugin that specifically manages concurrent WordPress sessions. Install it from Plugins → Add New, activate it, and look for settings named along the lines of session limit, concurrent logins, active sessions, or force logout.

Set the global limit, choose whether to block the new login or terminate the oldest session, and exclude administrators if the plugin supports role exclusions. Confirm that it controls active sessions rather than only failed login attempts.

Configure the membership rule

If your members use Paid Memberships Pro, its Limit Logins controls are a suitable fast option for limiting active member sessions. Configure the allowed session count and the action taken when the limit is exceeded. Use the session-limit controls for account sharing; failed-attempt lockout settings solve a different problem.

Keep an administrator account outside the restriction where possible. Otherwise, a stale session or an incorrect limit can lock you out of the dashboard when you need to fix it.

Test every login path

Create a test member account and sign in from two browsers or one browser plus a private window. Check the result at the limit, then sign out and confirm that a new login is allowed. Also test the member area, password reset, mobile layout, cached pages, and any custom login form.

A common support problem is that an old session is destroyed in the database but the other browser appears logged in until it makes another request. Test a page refresh or navigation before assuming the control has failed. If you are locked out, use the plugin's session-reset tool, the Users screen, WP-CLI session commands, or temporarily disable the custom control.

The fast route

Let Paid Memberships Pro do it

Session-limit controls for Paid Memberships Pro; choose it to prevent account sharing rather than block repeated login attempts.

Get Paid Memberships Pro

Sources

  1. developer.wordpress.org /reference/functions/wp_get_all_sessions/?utm_source=openai
  2. developer.wordpress.org /reference/hooks/wp_authenticate_user/?utm_source=openai
  3. developer.wordpress.org /cli/commands/user/session/?utm_source=openai

Questions

Does WordPress limit a member to one login by default?
No. WordPress can keep several valid sessions for the same user across browsers and devices. It provides functions for listing and destroying sessions, but there is no standard dashboard setting for a maximum concurrent-session count. You need custom authentication logic or a plugin that adds session-limit controls.
What is the difference between simultaneous logins and login-attempt limits?
Simultaneous-login control limits the number of active authenticated sessions for one account. Login-attempt protection limits repeated incorrect passwords, usually by IP address or username. A failed-login plugin will not normally stop a member from sharing a valid password with another person.
Can I limit members to one device without a plugin?
Yes, but not with a WordPress setting alone. A developer can create a small plugin that checks the user's stored session tokens during authentication and either returns an error or removes an older session. The code must also consider custom login forms, API access, race conditions, and how users recover from stale sessions.
Why does the first browser sometimes still look logged in?
Ending a session removes its server-side token, but the old browser may not discover that until it makes another request. A video, open page, or cached screen can therefore appear active for a while. Test by refreshing or navigating to a protected page, and explain this behaviour in your member-facing message if the plugin supports custom notices.
Will limiting simultaneous logins stop account sharing completely?
No. It makes casual sharing harder by restricting active sessions, but it cannot identify every person using a valid account. Members may still share one browser session, use a remote connection, or wait for another session to expire. Combine the limit with individual accounts, sensible session expiry, activity monitoring, and clear membership terms.