How can WordPress delete users in bulk when the user_id
is already known?
Is there an easy way to do this? For example SQL CLI
or PHP CLI
or something like that. Has anyone already done this?
How can WordPress delete users in bulk when the user_id
is already known?
Is there an easy way to do this? For example SQL CLI
or PHP CLI
or something like that. Has anyone already done this?
2
Answers
Try the following snippet to delete specific users whose ids are known.
Use the WordPress CLI. There’s a user delete command which can accept a list.
Examples from the docs:
Documentation: https://developer.wordpress.org/cli/commands/user/delete/