background fususu logo boat

Best Way To Stop Comment Spam on WordPress Without Plugins...

small_logo 1649 views

Are you tired of comment spams? No plugins seem to work as good as you want? You’re like me. Before discovering the best way to stop comment spam on WordPress, I had tried a lot of Akismet alternatives, but nothing could satisfy me.

the best way to stop comment spam on wordpress

Why Akismet or any anti-spam plugin is not the best way to stop comment spam on WordPress?

Have you ever opened the spam comment section, and see some not-spam-comments?

Sometimes Akismet treats to my readers’ comments as spam. I also try another anti-spam plugin that uses honeypot technology, which is considered the best way to stop comment spam on WordPress (also the simplest way), but it still happened.

Besides, installing any plugins will surely increase your request numbers and slow down your website. Someone suggested to me that the best way to stop comment spam on WordPress is… to use no plugin at all. They made any comments must be approved by an admin, that’s a good idea if your blog is small, imagine you have thousands of comments to approve!

So what is the best way to stop comment spam on WordPress without plugins?

To find the best solution, I asked the question, “Why are there so many comment spams? Why people made this?”

what is the best way best way to stop comment spam on wordpress without plugins?

Look at a normal comment form, and any spam comments, you will easily find the answer. They are backlinks. When a spam comment is made on your site, their purpose is to put links on the comment content, or in the URL, and hope that they will drive traffic to their sites.

That made me think of an idea. How about treating any comments with URLs as spam! That’s good, but what if a reader wants to share a URL? Like an image or something? So I found the best way to stop comment spam on WordPress: Treat any comments that fill the URL as spam.

But how about normal readers want to fill their URL? No. I won’t let them do it by hiding it. I think it’s better to hide the URL because it’s more convenient for the readers. I don’t know about you, but 90% of my readers don’t have a website, so why I need that URL input?

My best way to stop comment spam on WordPress without a plugin: Just a few lines of codes.

First, I will use CSS to hide the URL input area in the comment form. It depends on the theme, you can right-click at the comment form, then inspect the element to find the class we need.

.comment-form-url { display:none!important;}

Put the code in your style.css, it will hide the URL input area from normal users. So if a comment has that area filled, it must be spam. Now we need a code to detect that kind of comment and automatically put them to the spam folder.

function susu_check_honeypot( $approved ) {
    return empty( $_POST['url'] ) ? $approved : 'spam';
add_filter( 'pre_comment_approved', 'susu_check_honeypot' );

Put this code in functions.php, it will turn the URL input area in comment form into a honeypot. I believe 100% comment bots will surely fill this area because it’s their purpose. That’s why I believe this honeypot is the best way to stop comment spam on WordPress.

Now you know my best way to stop comment spam on WordPress. What’s yours? Just comment!



You can wait for to get the hidden content, or just share to see it now. Sharing is the key to succeed!


Have a good day!
Fususu wrote on 26/10/2019. Updated 09/04/2020.

P.s. To motivate me, you can google this keyword best way to stop comment spam on wordpress, find my blog there then comment the position. Thank you so much!

Wow, there are (2) Awesome Comments!

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. avatar Patirck

    This was a great post. I am working on a different solution. I learned that spammers dont use the website they use scripts that post directly to wp-comments-post.php. I hope to add a blank field and do something simiilar. Their post will see there is a “blank” field named “blank” and probably fill it out. I have to hide it with javascript. So I am looking for a way to detect content in the additional field and then put it into the spam or prevent the post entirely. if “blank” !== “” then its not going anywhere… but I am not sure how. If you get a chance let me know what you think.

Bài Tiếp Theo (15)