We have over 900,000 spam users! and they do not play any role. We want to remove all spam users and their meta.
In this answer and this link, we can delete users based on the role, but our spam users have no role.
This query returns real users:
SELECT user_id FROM wp_usermeta WHERE meta_key = 'wp_capabilities'
In usermetaspam users do not have a key capabilities.
We want to remove spam users with a database request.
source
share