Sep 24, 2023 4:20 pm
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
Sep 24, 2023 4:31 pm
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 -->
Sep 25, 2023 10:52 am
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'