Hello I have over 60k users on my wordpress site and using serching for users takes 30s + on a massive server. I would like to remove users that have registered prior to selected date and have a specified role, how can i approach it? The only way that comes to mind is removing them from wp_users and wp_usermeta tables, but im not sure if thats enough. I have searched for plugins but couldn't find anything. Thanks.

  • 1
    Absolutely don't do it by the database! A good way in my opinion is to write a script that fetches all the users and delete them with the functions of WordPress.
    – Antonio
    May 20, 2020 at 8:29
  • Do you mean in the admin site? There's an old answer here that says this is to do with looking up roles per user, so it ought to be possible to index those more efficiently so you can cope with more users, or ignore the roles when rendering the page. I can't believe no-one's done anything about that though if this is a common problem :-/
    – Rup
    May 20, 2020 at 8:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.