How to bulk delete WordPress user with specific roles?

WordPress Hacks

How to bulk delete WordPress user with specific roles?

Spam users especially spam subscribers are something which you don’t want to keep into your list. Today I am going to share how can you bulk delete WordPress user with specific roles in a click? You don’t need to do it manually.

Whenever a user joins your website then you have to provide them a unique role like Administrator, Subscriber, Editor, Author and more.

Sometimes you unknowingly use a feature that every blog comment should be done only by signed in user. So, whenever a bot comments on your website, they create a default profile. In my case, it was a subscriber.

There may be some other specific reasons for getting a high amount of subscribers on your website. I want to know what was that. Specify that in comment section.

Read AlsoWWW vs Non-WWW which is beneficial for SEO?

So, let’s see how I have deleted all those in bulk. I am going to tell you two methods for this.

Bulk delete WordPress user with a specific role manually

This process is time taking if you have a long list to delete. Yet, if you are a blogger you should know this. For deleting a WordPress user of a specific role, simply go to WordPress Admin Area – > Users.

You can find a list of subscribers with theirs specific role. If you see the image. you can easily observe that we have more than 13000 subscribers in which most of them are either spam or bots created.

User role in WordPress - deleting a specific user role in Bulk

If I start deleting it manually. In one go I can delete only 20 users. So for me it is a very cozy task. But not for a plugin.

If you want to increase the no of subscribers shown to you. You can opt Screen option, available in the top right corner.

Screen Options in WordPress - deleting a specific user role in bulk

So, If I have to delete all the subscriber here. I will choose 13795 and click on apply button. If I do so then all the subscribers will be listed. Once listed I can select them all.

Aah, this is not so simple also. The maximum no of user which can be displayed on a page is 999. So, I can not select more than that. It simply signifies we have to repeat the selection process 14 times to delete all the subscribers.

Let’s delete 999 subscribers just to see how this manual deletion works? Select all the subscribers on the Page. After selection, choose delete option in Bulk Actions and click on apply to delete.

delete subscriber in bulk from wordpress website

A confirmation page will be seen, You just need to click Confirm deletion button. You are done with the manual deletion here. This is how it goes.

Confirm subscriber deletion in WordPress - Specific user deletion in bulk

If you have less no of subscribers to delete then this process is helpful for you. But, as you can see in my case it is not a usual case. I have to delete all subscribers. So manual deletion of a specific role is not recommended.

I have decide to do this with the help of a plugin called Bulk Delete.

Read AlsoSEO Benefits of Pingback in WordPress

Bulk delete WordPress user with a specific role using Bulk Delete Plugin

Bulk delete is quite simple to use if you want to delete a user specific role However, sometimes you may need to select users based on other criteria as well.

For example, you may want to delete users who are not active from a long time or users who signed up during a specific period of time.

In situations like this, the default user management tools will not be enough. Luckily, plugins like ‘bulk delete’ allow you to efficiently perform bulk tasks. Not only for users but also for posts, pages, categories, metafields and more

Let’s see how to delete users with specific roles using a Bulk Delete.

The first thing you need to do is install and activate the Bulk Delete plugin. After activation, you need to visit Bulk WP-> Bulk Delete Users

Bulk Delete Users using Bulk Delete Plugin - Deleting Specific user role in Bulk

Now, first, you need to select the specific user roles which you wanna delete. After that you can select the filtering options.

You can restrict bulk delete to user specific –

  • Restrict to users who are registered in the site for at least ____ days
  • Users who haven’t logged in the last __ no. of days.
  • Only if a user doesn’t have any post.
  • Only delete first __ users.
Deleting bulk no of subscriber using Bulk delete

A user can also be selected using User Meta. Scroll down a little to the ‘By User Meta’ box. In this box, you can select meta fields and use conditional operators to compare their values.

Once all the setup and filtering will be done, just click on Bulk Delete button to get rid of these spam or not required users. Isn’t it simple? Yes, it is.

That’s all, you are done here. I hope you are clear with the topic “How to bulk delete WordPress user with a specific role?”

If you liked this article, then please subscribe to our YouTube Channel. You can also find us on Twitter and join our Digital marketing hacks Facebook group.

Have some queries? Feel free to comment below.

Read Next How to Create a WordPress Website step by step?