How to Bulk Delete WordPress Users
A WordPress website can easily get overrun by new spam users every day, especially if you’re running a forum like BuddyPress.
Spam can easily hijack your WordPress activity stream and dashboard with irrelevant comments, forum posts, and new users. You might even get thousands of new WordPress subscribers and participants every day that don’t belong there. To make matter worse it’s hard to delete them all at once because there is no default option to bulk delete WordPress users.
The WordPress spammers’ main objective is to essentially take over of your WordPress website, drain your server of resources, and promote other websites and services on your WordPress website.
Luckily, it is not difficult to bulk delete WordPress spam users.
Bulk Delete Users
WordPress will only display 20 users by default in the backend. However, you can actually change how many users are displayed at a time by using the Screen Options tab, which is located in the top right of the page.
When you click Screen Option, new settings will displayed that allow you to organize the columns and number of items per page. In the Pagination section you can select to view 1 to 999 items per page, but I would not recommend going over 500 if you plan to delete them because it can slow your site down or give you a 414 Request-URI Too Large error.
You can bulk delete WordPress users by adjusting the number of items displayed per page to 400 rather than 20. Doing this will allow you to delete several hundred more users at a time rather than just 20.
While this is an excellent method to delete WordPress spam users on a website that only has a few hundred to a few thousands of users, there are other sites that have much more.
If your site requires another approach you should consider using a free plugin to bulk delete users if you have several thousands of new users spamming your site.
One such plugin that can delete WordPress users in bulk is a plugin named Bulk Delete, which allows you to delete delete users, delete posts, delete pages and delete meta fields based on different manually inputted conditions and filters.
If you are running a WordPress Multisite network, WangGuard is a good option that doesn’t actually require Multisite in order to function, although it does support networked sites. WangGuard provides a lot of features that can help a Multisite manage WordPress spam users that have already completed the registration process. The plugin has a built-in wizard that can scan your installation for potential spammers. Once the scan is complete the plugin will then quickly check all found spam in order to easily delete them in bulk.
If you want to stop new spam users from registering on your WordPress website then an Anti-Spam plugins are recommended. Installing spam blocking plugins when you initially launch a site will help stop spam, and ensure you don’t have to deal with being overrun with spam users.