SQL to run below (change table name to your prefix)
DELETE from wp_users where wp_users.ID not in ( SELECT meta_value FROM wp_postmeta WHERE meta_key = '_customer_user' ) AND wp_users.ID not in ( select distinct(post_author) from wp_posts )LIMIT 1000; delete from wp_usermeta where wp_usermeta.user_id not in (select ID from wp_users) LIMIT 1000;
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article