If you have just built a WordPress website without promptly installing spam comment plugins, you will definitely get hundreds of garbage comments every day. Spam status is getting more sophisticated every day and can surpass the Akismet Anti-Spam plugin: Spam protection. I have a satellite website for too long and I am interested in nearly 1500 trash comments, all are still in the pending mode. To quickly delete all garbage comments on WordPress, you can do the following:
Join the channel Telegram belong to Anonyviet 👉 Link 👈 |
This is the simplest way, suitable for websites with a low or medium number of garbage comments. The administrator only needs to visit the WordPress dashboard, select the “Comments”, then switch to the “Spam” tab or “pending” to filter out invalid comments. Here, you can select all the comments displayed, perform the action “Move to Trash” (transferred to the trash) and confirm.
Each page usually shows about 20 comments, but you can increase this number to 100 or 200 by clicking the “Screen Options” button and adjusting the number of comments displayed on 1 page.
Note If the quantity is too large, it may be hang The website occupies a lot of PHP processing resources.
Method 2: Delete by SQL or WP-Cli
If you have access to the website’s database via phpmyadmin or use VPS that supports SSH, then deleting garbage comments with SQL commands or WP-Cli tools is the fastest and most compact choice.
With just one SQL command line like DELETE FROM wp_comments WHERE comment_approved = 'spam';
all the comments marked as spam will disappear immediately.
If you want to delete the comment is waiting for approval, you just need to change the condition to comment_approved = '0'
.
In case of using WP-Cli, you can use the command wp comment delete $(wp comment list --status=spam --format=ids)
To delete all comments with 1 Enter button.
Method 3: Use a plugin to delete a series of automatic garbage comments
For websites with large quantities of spam comments, the use of plugins is the optimal solution. Plugin WP Bulk Delete is a popular and easy -to -use option. After installing and activating this plugin, you only need to visit the comment manager in the WP Bulk Delete, select the type of comment to delete such as “spam”, “pending” or “all”, then press the confirmation button to proceed to delete mass.
The implementation time only takes a few minutes and does not require users to manually manipulate many times. Some other plugins like Delete Pending comments you can refer to the trial