I had a lot of spam members in my WordPress installation (thanks to BuddyPress and it’s horrible system of registration and profile syncing). I would like to run a query to delete all members who have registered in last one month (or any particular time frame).
Then, how to delete the corresponding records from wp_usermeta
table too along with deleting records from wp_users
table?
I would recommend, as with any destructive query, first testing it by replacing
DELETE
withSELECT *
.Afterwards clean up meta with: