Remove all WordPress comments before a specific date
You can remove all WordPress comments submitted by your users before a specified date.
- Log into phpMyAdmin (cPanel / Plesk / Web Hosting / Managed WordPress).
- Select the database for your WordPress site in the left-hand column.
- Click the SQL tab.
- Enter the following command into the "Run SQL query..." box:
DELETE from wp_comments WHERE comment_date <= 'YYYY-MM-DD HH:mm:ss'
Update the command for your situation as follows:
- YYYY is year
- MM is month number
- DD is the day
- HH is the hour
- mm is the minute
- ss is the seconds
If you do not want to specify the time you can enter 00:00:00 for that part of the command.
Warning: If your WordPress database uses custom table prefixes, then you must replace wp_ in each command with the prefix listed in your wp-config.php file. - Click Go.
More info
- Return to Remove bulk comments in WordPress
- For more information about our premium support for WordPress, please visit our WP Premium Support Catalog.