Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

[Closed] Can I mass delete my inactive users?

3 Posts
3 Users
0 Reactions
1,440 Views
Posts: 7
 AAR
Topic starter
(@aar)
Active Member
Joined: 5 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? 

Thanks.


2 Replies
dimalifragis
Posts: 2600
(@dimalifragis)
Famed Member
Joined: 6 years ago

Hi,

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 -->

Robert
Posts: 10595
Admin
(@robert)
Support Team
Joined: 10 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'