WordPress is a simple and easy to use CMS, at the same time it’s a very powerful platform with many features and compatibilities.
As you work on your WordPress and build your community, you have a long list of registered users with different user roles in WordPress. Sometimes it is necessary to delete some of them. What do you do when you need to delete hundreds of users with a specific role?
You can spend hours and delete them one by one. However, there is a simple way to bulk delete WordPress users with a specific role.
You can bulk delete WordPress users with specific roles. In this article, we explain different ways of doing it.
Why do we need to delete users based on their roles?
WordPress admins can assign users to different roles. This will give the users different permissions to access the site.
There may come a time where you don’t need a specific role. For example, you have changed your free registration policy and want to delete the old users from the site. Or as a teacher, you have created a specific role for your students. At the end of the study year, you can delete all users with a student role.
Therefore, it’s useful to know how to bulk delete users with a specific role.
Manually deleting users with a specific role
Manually deleting users in WordPress is very simple, you don’t even need to install a plugin. To do so, simply head over to your WordPress dashboard and open your Users page.
In the middle of the screen, you can see available roles. When you click on a specific role, you see every user in that specific role.
This page only displays 20 users at a time. If you wish to see more users, on top of your screen click on “Screen Options” and change the “Number of items per page” from 20 to any number you desire. On this page, you can delete any users you want.
For example, you want to delete users with the same role and there are 144 users in the role. You need to type in 144 in the “number of items per page” option and click apply. After refreshing the page you can see all 144 users on the same page.
Now to select every user in that specific role, click on the role and click on all checkbox to select every user. You can uncheck users you want to keep.
Once you have selected the users you want to delete, from the bulk actions menu select delete and click on apply.
WordPress automatically deletes every user you have selected. If users you want to delete, have any posts on your website, WordPress will ask you what would you like to do with their posts.
You can delete every single post created by the users or transfer them to another user and click ok.
This method is useful if you want to delete hundreds of users. However, if you want to bulk delete thousands of users with a specific role, you can’t use this method to delete them.
Because it adds extra pressure on your server. Therefore, you need to use a plugin to bulk delete WordPress users with a specific role.
Bulk delete WordPress users with a specific role using a plugin
By default, WordPress has designed an easy way to delete users with a specific role.
But sometimes you need to delete users with a specific role based on their activity level.
For example, you may want to delete users who haven’t logged into your website in a long time or users who only signed up because you were doing an offer.
The default features of WordPress won’t cover this aspect. However, you can use WordPress plugins to take care of your needs.
The first step you need to take is to head over to your WordPress dashboard, from Plugins click on Add New and in the search box type in “Bulk Delete”.
Then proceed to install and activate it. Once you have installed it on your website, from “visit Bulk WP” head over to “Bulk Delete Users” page. Here you can configure the plugin to bulk delete users.
First, you need to select users with specific roles. Then you can filter your selection. This way you can delete users you really want to delete.
- Users who signed up only for an offer
- Users without any posts
- Users who haven’t logged-in, in the past 7 days
- Old users
You can also select users based on user meta. At the bottom of the page, you can see “By User Meta” box.
In this box, check meta boxes and you can compare users. In the end, by clicking on bulk delete you can delete users you have selected.
Few other plugins to bulk delete users in WordPress
There are quite a few plugins to delete users with specific roles in WordPress. Here are some of the most popular ones:
WP Bulk Delete
WP Bulk Delete is a multifunctional plugin. This plugin allows you to bulk delete pages, comments, posts, attachments, users, taxonomy terms and meta fields.
You can also transfer data to another user with the help of this plugin. However, this feature is only offered in the pro version.
If you want a detailed editor to edit your users, AMR Users is the best tool for you. This plugin has many features that give you more control over your content.
The most essential feature of this plugin is bulk deleting users. You can also publish lists with the help of shortcodes. This plugin also allows developers to analyze user data.
User Role Editor
By default, WordPress has defined user roles and capabilities. To change user roles and their capabilities you can use User Role Editor plugin.
Besides deleting user accounts, you can edit other features as well. Also, you can delete specific widgets from the WordPress dashboard.
In this plugin, you can also bulk delete users information which saves time. Deleting extra posts, pages and users can improve your website’s performance.
User Role Editor can also help you with adding and modifying new user roles. This plugin also allows you to assign multiple roles to users.