Notifications
Clear all

[Closed] Can I mass delete my inactive users?

3 Posts
3 Users
0 Reactions
568 Views
Posts: 7
 AAR
Topic starter
(@aar)
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? 

Thanks.

2 Replies
dimalifragis
Posts: 2614
(@dimalifragis)
Famed Member
Joined: 4 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: 10520
Admin
(@robert)
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'