11

Mass deleting spam comments in WordPress – DreamHost Knowledge Base

 3 years ago
source link: https://help.dreamhost.com/hc/en-us/articles/360030564232-Mass-deleting-spam-comments-in-WordPress
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Mass deleting spam comments in WordPress

Overview

Manually removing a large amount of spam comments on your WordPress site can be a daunting task, but fortunately there are various tools that make this task a bit easier.

This article describes how to use the following mass delete options to quickly delete spam comments on your WordPress site:

Option 1 — Mass delete comments within WordPress

The following steps show you how to mass delete messages using the built-in features within your WP-Admin panel.

  1. Open the WP-Admin panel for your WordPress site. 2019-07_wp-admin_comments_spam_01.fw.png
  2. Click Comments in the left-side panel. 2019-07_wp-admin_comments_spam_02.fw.png
  3. In order to view more than the default 20 items on a page, click the Screen Options link at the upper right. The following dialog box expands from the top: 2019-07_wp-admin_comments_spam_03.fw.png
  4. Select the number of items you wish to appear on the screen, such as 200. You can determine a number by the looking at the number of 'Pending' messages that appear, which may indicate the total amount of spam comments.
  5. Click the Apply button when finished. 2019-07_wp-admin_comments_spam_04.fw.png
  6. Review the comments and then make the following selections:
    • Pending — Click this tab, which shows you only the messages that have not been approved and are likely spam comments.
    • AuthorOptional. Click this checkbox to auto-select all the comments. You can also manually select comments as needed.
    • Mark as Spam — Select this option from the 'Bulk Actions' drop-down list.
    • Apply — When finished, click the Apply button to move the selected comments into the Spam folder.
    2019-07_wp-admin_comments_spam_05.fw.png
  7. To permanently delete the spam comments from your site, click the Spam tab and then click the Empty Spam button.

Option 2 — Mass delete comments within phpMyAdmin

For advanced use only. Make sure you are careful whenever making adjustments in phpMyAdmin. Any misconfiguration in your database could potentially cause your site to not operate properly.

You can also mass delete comments by logging into your site's phpMyAdmin account and making adjustments directly to the database tables.

For more information on phpMyAdmin, see the following article:

To mass delete comments in phpMyAdmin:

  1. Log into phpMyAdmin. For more information on finding your database credentials, see the following article: 04_BackupMysql_phpmyadmin_login.fw.png
  2. Enter the MySQL hostname, username, password, and then click the Go button to continue. The phpMyAdmin dashboard page opens showing you all the tables in your database. The directories for the database appear in the left-hand panel: 2019-07_wp-admin_comments_spam_07.fw.png
  3. Click the link for your website at the top. This example shows exampledreamhost_com. The table list appears for the database directory you clicked: 2019-07_wp-admin_comments_spam_08.fw.png
  4. Check the box that appears next to wp_commentmeta and wp_comments. The name of your comments table may differ depending on the table prefix you choose during your WordPress installation. 2019-07_wp-admin_comments_spam_06.fw.png
  5. After selecting the comments table, locate the 'With selected:' drop-down menu below the table list and then select 'Empty'.

    You should log into your WP-Admin panel and make sure that all the comments are in fact spam before emptying these tables. It is not possible to recover these comments after you empty them.

    The following warning box appears prompting you to confirm: 2019-07_wp-admin_comments_spam_09.fw.png
  6. Click the Yes button to continue. All the comments are then deleted from your WordPress database.

See also

Did this article answer your questions?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK