Make a backup of your database earlier than you learn any additional. I am not accountable should you delete your customers and can't convey them again. You've been warned.
First delete the customers, the place the
wp_users.ID is just not discovered within the
wp_posts.post_author column. We use distinct right here as a result of a single consumer ID might be the writer of one thousand posts, and be returned one thousand occasions once we solely want it as soon as.
delete from wp_users the place wp_users.ID not in (choose distinct(post_author) from wp_posts);
Think your accomplished? Look in your
Now we delete all of the
wp_usermeta entries the place the
wp_usermeta.user_id just isn't discovered within the
wp_users.ID column. Similair to the final question however simply pointing at totally different tables and eradicating the distinct because the ID column is already all distinctive values.
delete from wp_usermeta the place wp_usermeta.user_id not in (choose ID from wp_users);
- 24 Best WordPress Themes for SEO Experts
- How to Code Mobile and Desktop DFP Ads on WordPress
- WordPress starts adding noopener noreferrer tags automatically
- How to Delete Revisions in WordPress
- How to Create a Custom Page Template for WordPress
- How to manage multiple WordPress sites from a single place using the MainWP plugin
- WordPress: Action Hooks vs. Filter Hooks
- Tutorial: How to Hide WordPress Theme Name From Source Code
- How to Create a Multilingual WordPress Site with WPML
- 14 Best WordPress Magazine Themes of 2016