Sometimes it's really annoying to delete huge spam comments from the WordPress admin panel or get really slow with this admin panel. So what we can easily do is, delete all the comments in the MySQL database using PhpMyAdmin or the command line.
Method:
You’ll need to delete the content of two tables: 'wp_comments" and "wp_commentmeta" which are used to store comments in WordPress.
Note: Depending on the table prefix, that you select during WordPress installation, the name of your comments tables may vary (eg. Prefix_comments & Prefix_commentmeta).
Method 01 - QUERY (Delete all data):
DELETE FROM `wp_comments`;
DELETE FROM `wp_commentmeta`;
Method 02 - QUERY (Delete all data):
TRUNCATE `wp_commentmeta`;
TRUNCATE `wp_comments`;
Note: 'TRUNCATE TABLE' removes all rows from a table, but the table structure and its columns, indexes, and constraints will remain. Also, it is faster than MySql 'DELETE' command.
Thank you for watching the video
Тэги:
#frontxcode #wordpress #wordpress_spam_comment_delete #spam_comment #quickly_delete_all_wordpress_comments #delete_comments_in_mysql #sapm #delete #comments