How to Auto Move all Comments with a Link to Trash in WordPress?

If you are really tired of moderating comments having one or more links in WordPress? And you don't want any single link in the comment. You can then use the below approach to auto-move all comments with a link to the trash in WordPress.

Automatically Move Comments with a Link to Trash in WordPress

  1. In WordPress, click on the Settings > Discussion.
  2. Then in the Disallowed Comments Keys Section, add the following words (one word per line):
  • HTTP
  • ://
  • www
  • https

Below is the screenshot for your reference:

WordPress Discussion settings page.

After specifying these words, click on the Save button to save the changes.

Now, whenever a comment contains links in the comment, URL, or author's name field, it will automatically move to the trash folder. There you can delete all the comments at once by clicking on the Empty Trash button.

See also:

Disable Smart Quotes in WordPress

Leave a Comment