Summary of WordPress deletion methods to be reviewed/spam comments

Source: Internet
Author: User
Tags comments

Through the preceding SQL statement, we can clearly understand that the wordpress comment table is wp_comments, and the comment_approved is the comment response field.
Comment_approved is equal to 1: Review comments
Comment_approved equals 0: comment to be reviewed
Comment_approved equals to trash: Comments from the recycle bin
Comment_approved equals to spam: spam comments


The details are as follows:

Method 1: delete pending comments, spam comments, and recycle bin comments.

The code is as follows: Copy code
Delete
FROM 'WP _ comments'
WHERE 'Comment _ approved 'not like '1 & prime;

Method 2: delete only pending comments

The code is as follows: Copy code
Delete
FROM 'WP _ comments'
WHERE 'Comment _ approved' = '0 & prime;

Method 3: delete spam comments only

The code is as follows: Copy code
Delete
FROM 'WP _ comments'
WHERE 'Comment _ approved' = 'spam'

Method 4: delete only the recycle bin comment

The code is as follows: Copy code
Delete
FROM 'WP _ comments'
WHERE 'Comment _ approved' = 'trash'

Today, we found another method to delete spam comments in batches.

We can download and install a Plugin plug-in-Delete Pending Comments-WordPress plug-in that can Delete all Pending Comments.

After the installation, you can see the "Delete Pending Comments" link under the wordpress background management Comments. Click this link and you will be asked to manually enter a line of words "I am sure I want to delete all pending comments and realize this can't be undone" (I'm sure to delete all comments to be reviewed) and the deleted comment cannot be restored) to delete all comments to be reviewed in batches. Note: This is the comment to be reviewed, not all comments, so old comments will still be retained (including those marked as SPAM will not be deleted ).

Use the WordPress plug-in to delete all comments to be reviewed

After entering this sentence, click the Delete Pending Comments button below to Delete all Comments to be reviewed in one click.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.