Clear all

[Closed] Can I mass delete my inactive users?

3 Posts
3 Users
0 Reactions
Posts: 7
Topic starter
Active Member
Joined: 3 years ago

When I try and mass delete my inactive users, the forum software crashes. I'd like to delete 25K inactive users. Is there a way to do this? 


2 Replies
Posts: 2614
Famed Member
Joined: 4 years ago


What "crashes" exactly means? What is the error?

Also this should be removed from wpForo pages.

<!-- Page supported by LiteSpeed Cache 5.6 on 2023-09-24 12:33:46 -->
Posts: 10520
Support Team
Joined: 8 years ago

Hi @aar,

Use PhpMyAdmin plugin or the same tool in your hosting cPanel, go to the SQL tab and execute the following SQL. Make sure you have a backup of your database. Also, please make sure your table prefix is wp_, if it isn't, change all red marked wp_ prefixes to yours.

DELETE u, um, p FROM wp_users u
   INNER JOIN wp_wpforo_profiles p ON p.`userid`   = u.`ID`
       LEFT JOIN wp_usermeta    um ON um.`user_id` = u.`ID`
WHERE p.`posts` = 0
AND u.`ID` NOT IN( SELECT DISTINCT `post_author` FROM wp_posts )
AND p.status = 'inactive'