Hello all,
A while back I did briefly post this question and one extremely helpful forum member provided the following option...
BE SURE TO BACK UP YOUR DATABASE FIRST!!
To select users who have no posts or comments, you can use this:
SELECT *
FROM wp_users
WHERE ID NOT IN
(SELECT post_author FROM wp_posts
UNION SELECT user_id FROM wp_comments)
Then, replace 'SELECT *' with 'DELETE' to actually delete the records.
You will then have some 'orphan' records in wp_usermeta. Select them with this:SELECT *
FROMwp_usermeta
WHERE user_id NOT IN
(SELECT ID FROM wp_users)
Then, replace 'SELECT *' with 'DELETE' to actually delete the records.
I continue to get a very massive amount of new registrations with no posts and would like to delete them all from the database. Just wondering if the above is indeed a safe option to do this. If not, can you please provide another easy method to manage this issue?
Thank you all,
--mike