Method A: Plugin
I found one useful plugin to process bulk action such as block, delete, or send a verification email.
https://github.com/q2a-projects/Q2A-User-Manager
Once enabled the plugin, go to http://example.com/admin/users_management. Here you can access user data in searchable table format.
Method B: phpMyAdmin
- First, take the full backup of your database.
- Now, open phpMyAdmin.
- Run following SQL query. It's a dry run to verify the output result that has to be deleted.
- Remember, you should replace "qa" with your table prefix & "0" points with minimum points set for new (or inactive) users.
SELECT * FROM `qa_users`
WHERE userid IN (
SELECT userid
FROM qa_userpoints
WHERE points=0
)
Once verify the output table, you can initiate the actual delete command.
DELETE FROM `qa_users`
WHERE userid IN (
SELECT userid
FROM qa_userpoints
WHERE points=0
)
Now, you need to fire the final query in phpMyAdmin
WHERE userid IN (
SELECT userid
FROM qa_userpoints
WHERE points=0
)
Done..! I have deleted 13k inactive users (no question, answer, comment, etc.).