Skip to content

Instantly share code, notes, and snippets.

@PierreThiollent
Created September 22, 2021 12:27
Show Gist options
  • Save PierreThiollent/ce2426ff45c6aa1833b3a31b2c966dff to your computer and use it in GitHub Desktop.
Save PierreThiollent/ce2426ff45c6aa1833b3a31b2c966dff to your computer and use it in GitHub Desktop.
WordPress - Delete Users and Users meta of a certain role
DELETE wp_users, wp_usermeta FROM wp_users
INNER JOIN wp_usermeta ON wp_users.ID = wp_usermeta.user_id
WHERE meta_key = 'wp_capabilities' AND meta_value LIKE '%subscriber%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment