Last Login Column

Track when each user last logged into your WordPress site. A “Last Login” column appears in the Users list, showing relative timestamps like “2 hours ago” or “3 days ago” — perfect for identifying inactive accounts and monitoring user activity.

Use Cases

  • Identify inactive user accounts that may need cleanup
  • Monitor team member activity and engagement
  • Spot unusual login patterns that might indicate security issues
  • Track when clients last accessed their dashboard

How It Works

  1. Enable the module in Switchboard
  2. A “Last Login” column appears in Users → All Users
  3. Each user’s login time is recorded when they log in
  4. The column displays relative time (“5 days ago”)
  5. Click the column header to sort by login date

Where to Find It

Location: Go to Users → All Users to see the “Last Login” column in the user list table.

What You’ll See

UserLast Login
admin2 hours ago
editor_jane3 days ago
author_bob2 weeks ago
subscriber_newNever

Column Values

DisplayMeaning
X minutes agoLogged in within the last hour
X hours agoLogged in today
X days agoLogged in within the last month
X weeks agoLogged in within the last few months
X months agoLogged in longer ago
NeverUser has never logged in (or logged in before module was enabled)

Sorting by Last Login

Click the “Last Login” column header to sort:

  • Ascending: Oldest logins first (find inactive users)
  • Descending: Most recent logins first (see active users)

This makes it easy to find accounts that haven’t been used in a long time.

Practical Applications

Finding Inactive Accounts

  1. Go to Users → All Users
  2. Click “Last Login” to sort ascending
  3. Users who haven’t logged in recently appear at the top
  4. Review and potentially remove stale accounts

Security Monitoring

Look for:

  • Unexpected logins at odd hours
  • Users showing activity when they should be inactive
  • Admin accounts with recent activity when no changes were made

Client Activity Tracking

For agency sites:

  • See when clients last accessed their dashboard
  • Follow up with clients who haven’t logged in recently
  • Verify clients are reviewing content after notifications

Data Storage

Login timestamps are stored as user meta:

  • Meta key: last_login
  • Format: MySQL datetime (YYYY-MM-DD HH:MM:SS)
  • Timezone: WordPress timezone setting

No Configuration Needed

This module has no settings. Enable it and:

  • The column appears automatically
  • Future logins are tracked
  • Existing users show “Never” until they log in

Limitations

Pre-Existing Logins

Users who logged in before enabling this module will show “Never” until they log in again. The module only tracks logins that occur after activation.

Login Method

The module tracks standard WordPress logins. Some SSO (Single Sign-On) or social login plugins may not trigger the tracking hook.

FAQ

Why does a user show ‘Never’ when I know they’ve logged in?The module only tracks logins after it was enabled. Users who logged in before you activated the module will show “Never” until their next login.
Does this track logins via third-party plugins?Most login plugins that use WordPress’s standard wp_login hook will be tracked. Some SSO or social login systems may bypass this hook.
Can I export the last login data?The data is stored as user meta. You can export it using the User Exporter module or access it programmatically with get_user_meta($user_id, 'last_login', true).
Is the exact login time stored or just the relative time?The exact datetime is stored. The relative display (“3 days ago”) is calculated dynamically for easy reading.
Does this affect site performance?No, the login timestamp is only recorded during login (one database write) and displayed when viewing the Users list. There’s no ongoing performance impact.

Combine this with regular security reviews. If you see admin-level accounts that haven’t logged in for months, consider whether they still need access.

This module tracks logins, not activity. A user might be logged in and active for hours, but only the initial login timestamp is recorded.

PRO

Get access to all 147 modules with a single license

Upgrade to Pro