AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Can I mass delete my inactive users?

3 Posts
3 Users
0 Reactions
1,609 Views
Posts: 7
 AAR
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@aar)
Active Member
Joined: 5 years ago
[#50346]

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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@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: 10736
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 2 months 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'

 


Share: