WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to delete all records from wp_usermeta with user_id whose meta_value is "tonetone" which is spam accounts.

As you know already, there are many records with one user_id in wp_usermeta. I tried like this but doesn't work. Thanks to anyone who can show me the way.

delete from wp_usermeta where user_id = (select user_id from wp_usermeta where meta_value = "tonetone")
share|improve this question

Just do:

delete from wp_usermeta where meta_value = "tonetone"

Don't you actually mean to delete the rows from wp_users, as opposed to just the metadata?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.