Chalkbeat has a great education Jobs Board that you should check out if you are looking for a job in education. It’s free to create an account on the site to list jobs but I found that there were about 12k users (bots) who had created accounts and never listed a job. So here is a quick SQL command to delete all the users in your WordPress install that aren’t the author of a post and free up some database space:

DELETE FROM `wp_users`
WHERE ID NOT IN
(SELECT DISTINCT post_author FROM `wp_posts`);

That’ll run through all the posts, make a list of the user IDs that ARE authors and then delete anyone who isn’t on the list from your wordpress users. Since custom post types are stored in wp_posts, it’ll be checking the author against all of those too. Easy!

LEAVE A REPLY

Please enter your comment!
Please enter your name here