Remove WordPress comments from a specific user
You can remove all comments left by a single user by deleting them in bulk in the WordPress database.
Warning: Always make a backup of your site before making any changes to the database.
- Sign in to phpMyAdmin.
- In phpMyAdmin, on the left menu, select the name of the database your site uses.
- On the top menu, select SQL.
- In the box below, enter the following code:
DELETE from wp_comments WHERE comment_author_email = 'email address'
- In the code, replace email address with an actual email address associated with the comments you want to remove. For example, if comments are associated with email@example.com, the code would be:
DELETE from wp_comments WHERE comment_author_email = 'firstname.lastname@example.org'
- (Optional) If your table prefix isn't wp_, replace wp_ before comments with your actual table prefix. You can check which prefix your site uses in the wp-config.php file.
- Select Go.
- When asked if you really want to execute the command, select OK.
All comments from the specified user are now removed from your site.