Advanced WordPress User Search
Users Insights is a premium WordPress plugin that turns the “Users” screen into a search and segmentation tool, no code required, so you can search, filter, segment and export users by any field you want (role, meta, custom fields, last seen, registration date, WooCommerce purchase data and more).
Why the default WordPress user search holds you back
The built-in search only focuses on a few basics (username, name, email). That’s fine for small sites, but as soon as you need to find “customers in Australia who signed up in the last 30 days and haven’t purchased yet,” it falls over. Users Insights upgrades that experience with Smart Filters, Custom Fields, User Groups, Reports and CSV export, all in your dashboard.
What you can do with Users Insights (in minutes)
With Users Insights you can manage users in WordPress in an instant, no coding, no database queries, no plugin juggling. In a few clicks you can search, filter and segment your users by anything that matters: name, email, role, registration date, location, activity, purchase history or custom fields.
Combine multiple filters to create powerful segments like “students who joined this month”, “customers without orders” or “members who haven’t logged in recently”. Once you’ve found what you need you can export to CSV, save filters for quick access or dive deeper into visual reports, all within your WordPress dashboard. Lets look at some of the use cases.
Searching WordPress users by their first and last name
By default, WordPress lets you store each user’s first and last name, but it doesn’t give you much flexibility when searching for them. The built-in search can’t tell the difference between first name, last name or display name which makes finding specific users a pain.
Users Insights solves this with powerful, flexible name filters.
Let’s say you want to get all the Lee’s from your user base; you can do that by simply searching Lee as the display name.
But if you want to check just Lee as a last name, you can do that as well:
Now you can see that we’re using the “contains” filter. You have other options as well depending on how you want to filter out your users. Here are the different variations for your search criteria:
- Contains / Does not contain
- Is / Is not
- Starts with / Ends with
- Is set / Is not set
You can see that each set of search criteria has its opposite. It just means that every time you are searching and get some results, searching for the opposite is going to hide all the current results, and show all users previously hidden.
Let’s have a look at each of these with some examples.
The contains filter is a broader view. It will return search results of all users that have this string, no matter where it appears in the selected field. For example, if we type “El” here are our results:
So we’ll get GabriEL, LouELla, EthEL and so on. The opposite (does not contain) will just reverse this logic, so any names that contain this string are going to be removed.
As for the “IS” filter, it’ll look for an exact match. Thus, if you know the user’s last name, for example, you can use it to filter them:
Should we search for a slight variation and we simply wouldn’t get this result. The “Is not” operator works in the same way, but removing the results that match our search text.
Regarding the “Starts with” and “Ends with” operators, they do exactly what it looks like. They’ll search our string in the beginning or end of our fields. Thus, if you want to export your users alphabetically, you can search for users whose name starts with “a”, then “b” and so on, exporting on each step:
The “is set” filter works in a little different way. Instead of allowing you to search for a specific name, it will show all the users who have any kind of value in the WordPress database set as their first name or last name fields in their WordPress profiles. The “is not set” field is particularly useful if you want to find all the WordPress users who have not entered their first name or last name on their WordPress profile page.
Searching WordPress users by email
The default WordPress user search lets you search by email—but that’s it. You can’t combine it with other filters or export the results.
Users Insights changes that. With its email filter, you can create precise, stackable searches and export your results instantly. Just click “Add Filter → Email” and choose from several options:
- Contains / Does not contain – Find or exclude partial matches (e.g., “@pepsi” shows all users with emails from pepsi.com, pepsi.co.uk, etc.).
- Is / Is not – Get an exact match when you know the specific email.
- Starts with / Ends with – Search emails that begin with “admin,” “hello,” or end with a specific domain like pepsi.com.
Lest look at few examples. So you could search for “@pepsi,” and this will show you all users with emails from pepsi.com, pepsi.co.uk, pepsi.com.au, pepsi.com.br, and so on.
Next, let’s see the “does not contain” filter. It works in a similar way, but it shows you search results that don’t contain the search phrase. This filter can be useful if you want to exclude a particular phrase or email domain from your user list, for example, to exclude free email providers such as Hotmail, Yahoo, and so on.
In addition, the “is” and the “is not” filters will show you only users whose email address matches or doesn’t match that specific search term. That’s useful when you know the user’s email (or just got an email from them) and want to know more about them.
As for the “starts with” and the “ends with” filters, in a similar way, they allow you to perform searches of your users by using the beginning and the end of their email addresses. The “starts with” filter can be used to gather all users with some common email names, such as admin, hello, contact, and so on:
Regarding the “ends with”, it could be used to get all emails from an exact domain, such as pepsi.com.
Searching WordPress users by user role
The WordPress user page allows you to filter your users based on their role. Clicking on the role name at the top of the user list will show you all the users that have that specific role assigned. In a similar way, Users Insights also enables you to list all the users that have a specific role, just by using the “Role is” filter.
Users Insights however, also provides another role filter that you might find useful when when it comes to searching your WordPress users by their role. The “Role is not” filter allows you to show all the users who don’t have a specific role assigned. For example, if you want to see all the users that are not admins, you can just apply a filter “Role is not Admin”:
Searching WordPress users by username
The username filter of Users Insights works in a similar way as the name filters that we already discussed. This means that you can perform similar searches of your WordPress users by their username. For example, you can use the “contains” filter for more broad user searches and the “is” and “is not” for more specific searches. The filters “starts with” and “ends with” are also available.
Searching WordPress users by custom fields
Before you can search users by custom fields, you need to ensure that you have custom fields set up for your users. Users Insights should be able to detect and display these custom fields in the user profile table automatically. If your custom fields are not showing, make sure they are correctly added to your user profiles.
You can register custom usermeta fields in the Custom Fields section of Users Insights:
All custom user meta fields can be readily accessed within the Users Insights filters, enabling effortless filtering of your WordPress user base based on these fields. The filter system automatically identifies the field type and offers corresponding conditions. For instance, text fields come with options such as “contains” and “starts with,” while number fields feature conditions like “is bigger than” and “is smaller than.
Here is an example of showing all the users with age greater than 30:
Here is another illustration of creating advanced search of WordPress users based on their occupation. In this case, our objective is to identify all users whose profession is connected to marketing.
Searching and sorting users by date registered
If you have ever been in need to find the most recently registered users in WordPress, you have probably noticed that there isn’t a way to do this with the default WordPress functionality. The user list in the WordPress dashboard is ordered alphabetically, and there isn’t a Date Registered column in the user table. This information is only available in the user profile section, and there isn’t a way to sort your users by date registered.
The Users Insights plugin makes the date registered field available in the Users Insights user table, as well as in the smart filters. Therefore, if you want to find your most recently registered users, all you need to do is click on the date registered column title. In this way, the user list will get ordered by this field, showing you the most recently registered users at the top of your user list.
Since this information is also available in the filters, you can use it to apply custom filters based on the date the user has registered. Here is an example showing all the users that have registered in the last 30 days:
There are multiple filters that you can apply for the date registered field:
- Less than [number of days]
- More than [number of days]
- Exactly [on a date]
- After [date]
- On [date]
- Before [date]
Conclusion
Users Insights gives you everything you need to search, filter and sort your users with precision. From custom fields and user roles to activity tracking and reports, it turns your WordPress dashboard into a user management system.
Ready to go beyond the basics? Check out the full Users Insights features and integrations to get more insights and total control over your WordPress user data. If you’re using custom user meta fields, make sure to check out How to display, search and filter WordPress user metadata, as well as the other Users Insights integrations and features.