Sign-in
Sign-in errors and sessions
Stops the sign-in page from telling strangers which usernames exist, signs out sessions left idle, and caps how long "Remember me" keeps someone signed in.
What it does
Hide login error details: normally WordPress says "unknown username" or "wrong password", which tells a robot when it has found a real account. With this on, both mistakes show the same message: "The username, email address or password is incorrect."
Idle sign-out: if someone leaves a signed-in browser alone for the number of minutes you choose, the next page they open asks them to sign in again.
"Remember me" length: how many days a ticked "Remember me" box keeps a person signed in. WordPress uses 14 days unless you change it.
Why it matters
Half of a password guess is the username. Hiding which part was wrong makes guessing much slower.
A laptop left open in a café or a shared office computer is an open door. Idle sign-out and a shorter "Remember me" close it on their own.
Set it up
- Go to the Login tab, section Sign-in security, panel Sessions.
- Switch on Hide login error details.
- In Idle sign-out, type a number of minutes, for example 60. Use 0 to switch it off. Any value is kept between 5 minutes and 7 days.
- In "Remember me" length, type a number of days, for example 7. Use 0 to keep the WordPress default of 14 days.
- Click Save Changes.
Good to know
Messages about lockouts, CAPTCHA and two-factor still show as normal, so real people know what to do.
Someone signed out for being idle in the admin area sees "You were signed out because the session was idle" and returns to the same page after signing in.
An open admin tab that only sits there does not count as activity, so idle sign-out still works when a tab is left open.
Limiting how many sessions one user may have at once is on the roadmap.
Which plan includes it
Hiding login error details is included in every plan, including Free. Idle sign-out and the Remember me length are part of Pro; on Free, sessions follow the WordPress defaults and any values saved earlier are kept.
How it works, for developers
- Error hiding runs on the
authenticatefilter at priority 100. It only replaces the error when every error code isinvalid_username,invalid_emailorincorrect_password, so the activity log and thewp_login_failedaction still see the real reason. - Idle sign-out stores the last activity time as
smg_last_activityinside the WordPress session token (user metasession_tokens), written at most once a minute. The check runs oninitat priority 1. The admin heartbeat is ignored. - Sign-ins without a cookie session, such as application passwords and scheduled tasks, are not affected by idle sign-out.
- "Remember me" length uses the
auth_cookie_expirationfilter at priority 20 and only applies when the box is ticked. - Settings:
smg_login_generic_errors,smg_session_idle_timeout(minutes),smg_remember_me_days. The recovery switchSMG_DISABLE_LOGIN_GUARDalso turns these off.
Quick answers about sign-in errors and sessions
What does Sign-in errors and sessions do in Stack Guard?
Hide login error details: normally WordPress says "unknown username" or "wrong password", which tells a robot when it has found a real account. With this on, both mistakes show the same message: "The username, email address or password is incorrect." Idle sign-out: if someone leaves a signed-in browser alone for the number of minutes you choose, the next page they open asks them to sign in again. "Remember me" length: how many days a ticked "Remember me" box keeps a person signed in. WordPress uses 14 days unless you change it.
Why use sign-in errors and sessions on a WordPress site?
Half of a password guess is the username. Hiding which part was wrong makes guessing much slower. A laptop left open in a café or a shared office computer is an open door. Idle sign-out and a shorter "Remember me" close it on their own.
How do I set up sign-in errors and sessions?
1. Go to the Login tab, section Sign-in security, panel Sessions. 2. Switch on Hide login error details. 3. In Idle sign-out, type a number of minutes, for example 60. Use 0 to switch it off. Any value is kept between 5 minutes and 7 days. 4. In "Remember me" length, type a number of days, for example 7. Use 0 to keep the WordPress default of 14 days. 5. Click Save Changes.
Which Stack Guard plan includes sign-in errors and sessions?
Hiding login error details is included in every plan, including Free. Idle sign-out and the Remember me length are part of Pro; on Free, sessions follow the WordPress defaults and any values saved earlier are kept.
More in Sign-in
- Login GuardMoves your sign-in page to an address only you know, so the robots that try passwords on every WordPress site cannot find it.
- Two-factor authenticationAdds a second step to signing in: after the password, a code from a phone app or an email. A stolen password alone is no longer enough to get in.
- Brute Force ProtectionStops password guessing by locking out anyone who gets the password wrong too many times in a row.
- Magic links for locked-out usersLets a real user who has been locked out ask for a one-time sign-in link by email, instead of waiting for the lockout to end or calling you.
- CAPTCHAAdds a quick "are you human?" check to your sign-in, sign-up, password reset and comment forms, so robots cannot use them.
Not running Stack Guard yet? It is free.
Download Free