Home > CMS Tutorial > WordPress > How to delete comments in wordpress

How to delete comments in wordpress

爱喝马黛茶的安东尼
Release: 2019-07-12 17:11:13
Original
3267 people have browsed it

For WordPress websites with good daily visits, there will definitely be a lot of spam comments to be reviewed. If you want to delete them through the WP background, it is simply a very time-consuming and labor-intensive project. Today, we mainly introduce the following two methods to delete spam comments in WordPress. We can execute SQL commands to delete in batches, or delete by enabling the Delete All Pending Comments plug-in.

How to delete comments in wordpress

Method 1: Delete All Pending Commnets plug-in

After searching in the background and installing the Delete All Pending Commnets plug-in, you can click on the left You will see a Pending Comments under the comment menu, go in and check the checkbox, and then click the delete button to delete all comments to be reviewed:

How to delete comments in wordpress

Related recommendations: 《WordPress Tutorial

Method 2: Delete through SQL command

If you don’t like to mess with plug-ins, and you can manage MySQL by logging in to PhpMyAdmin Database, then you can delete it through SQL commands.
Wordpress comment table is wo_comments, comment_approved is the field of comment response.

Comment_approved is 1: comments passed the review

Comment_approved is 0: comments to be reviewed

Comment_approved is trash: comments in the recycle bin

Comment_approved is spam: Spam comment

The detailed SQL command execution method is as follows. You can change the statement at any time as needed.

How to delete comments in wordpress

1. Delete pending comments, spam comments, and recycle bin comments

delete
From ‘wp_comments’
WHERE ‘cooment_approved’ NOT LIKE ‘1’
Copy after login

2. Delete only pending comments

delete
From ‘wp_comments’
WHERE ‘cooment_approved’ =‘0’
Copy after login

3 .Only delete spam comments

delete
From ‘wp_comments’
WHERE ‘cooment_approved’=’spam’
Copy after login

4.Only delete trash comments

delete
From ‘wp_comments’
WHERE ‘cooment_approved’=’trash’
Copy after login

The above is the detailed content of How to delete comments in wordpress. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template