Sign inBlogAboutSupportContact
Users

Find dormant WordPress and WooCommerce users for cleanup or a win-back campaign

List users with no detected activity since a date you choose. Uses login history, authored posts, comments, and registration date as signals. Read-only: it surfaces candidates without touching any account.

4 min read May 2026 find inactive users

Your user list grows in one direction only

Every opt-in form, every checkout, every free download adds a user to your WordPress database. Very few get removed. A year of moderate traffic and you have hundreds or thousands of accounts that have never logged in a second time, customers who bought once two years ago, and subscribers who have not opened an email since the first welcome message.

That bloat costs you in two ways. Deliverability suffers when you email addresses that never engage, which hurts sender reputation for the people who do open your messages. And any inactive account with a weak password is a liability, because bots cycle credential dumps against sites of every size.

What most people do

Export and filter in a spreadsheet WordPress's native user export gives you registration date and nothing else. You end up with a CSV, a VLOOKUP attempt against your email tool's open rates, and still no reliable "last login" column because WordPress does not track that natively.
Install a user activity plugin Most activity plugins start tracking from the day you install them and give you a dashboard, not a queryable list. Getting a clean export of "users inactive for 90 days" still requires manual steps or a paid add-on.
Write a custom SQL query Joining wp_users, wp_usermeta, wp_posts, and wp_comments to derive a "last activity" date is doable, but fragile: wrong role exclusions or a missing meta key and you delete active customers.

A better way: one command, four activity signals

TrueCommander's find inactive users command combines every available signal for last activity into a single ranked list. It is honest about what it knows and what it doesn't: the trc_last_login meta is populated on wp_login only from the moment TrueCommander was installed, so on a fresh install it falls back to posts, comments, and registration date automatically.

TrueCommander
Inactive users found
312 subscribers inactive for 90 days
Activity signals: login, post, comment, registrationbest available
Administrators excluded by default
Read-only. No accounts were changed.safe to run

The login signal is honest about its limits. trc_last_login is written on every wp_login event, but only from the point TrueCommander was installed. For users who have not logged in since then, the command falls back to latest authored post, then latest approved comment, then user_registered. Those fallbacks are always present, so every user gets a best-available activity date, not a blank.

How it works

1
Derives the best available activity date for each user For each user it takes the most recent of: trc_last_login meta (populated by TrueCommander on wp_login), the date of their latest published or draft post, the date of their latest approved comment, and user_registered as a guaranteed floor. The most recent of those four is the activity date.
2
Applies role filtering and exclusions Administrators are excluded by default. Pass -role to narrow to a single role (for example customer or subscriber), or pass -exclude_roles to exclude additional roles by slug. The two parameters combine, so you can scan all non-admin, non-editor accounts in one pass.
3
Returns a ranked list of candidates, not a deletion list The output is a list of user IDs, display names, emails, roles, and computed activity dates for users whose best activity date falls before your cutoff. Nothing is deleted or modified. You decide what to do next.
ParameterWhat it does
-daysUsers whose most recent detected activity is older than this many days are included in the results. Required.
-roleLimit the scan to a single role slug (for example subscriber or customer). Omit to scan all roles except those in -exclude_roles.
-exclude_rolesComma-separated list of role slugs to skip. Defaults to administrator. You can extend the default: -exclude_roles=administrator,editor,shop_manager.
-limitMaximum number of users to scan. Default 500, max 10000. On large sites, raise this or combine with -role to keep the query fast.
Can be used in

Real example

You are preparing a newsletter to your subscriber list and your email tool flags that your open rate has been declining for three months. You suspect you are mailing to a lot of dead addresses and people who signed up once and forgot about you.

You run tp find inactive users -days=180 -role=subscriber. The command returns 847 subscribers with no detected activity in the last six months. You pipe the list into a win-back macro that sends a single re-engagement email. Anyone who does not open or click over the next two weeks gets tagged with assign user tag for removal.

Your list drops from 3,200 to 2,100 active subscribers. The next newsletter hits a 28% open rate instead of 14%, and your deliverability score recovers within two sending cycles.

Goes further with TrueCommander

Ready?

Stop emailing people who stopped listening.

One of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.