Thursday , 4 January 2018

How to Reduce Spam Comments in WordPress

In the starting of this blog on WordPress, I never had any difficulty with “Spam Comments”, I used to receive upto 5 to 10 spam comments daily which is usual for WordPress users. But suddenly, few days back, I received 100+ spam comments every single day, it was full of headache to delete these comments upon login to WP Dashboard all the time. The “Aksimet” and some other plugins keep the spam comments in a separate folder, but the problem is; you have to delete them , because you don’t want the mess inside your dashboard. When I got tired of it, I started searching for solution, and also I tried to use every trick I knew regarding it. What I did so far and  how I reduced the spam comments upto 60% in a week, I’ll be sharing my experience with you in this post.


Before starting this post, I’ll give you a brief how-to-do steps to make the default settings inside your WordPress dashboard, so you can automatically reduce the spam comments in the starting of your blog, however, if you didn’t care, you might receive tons of spam comments from the first day.

How to Reduce Spam comments in WordPress

Here are few changes you can make in your WP dashboard after installing “WordPress“, this will actually solve half of the problem and for the rest, I’ll be sharing my previous few days struggles to get rid of this shit 🙂

Plugins to Install for Detecting Spam Comments

#1. Please install “Akimset” Plugin for detecting spam comments, this plugin is actually installed by default with your WP installation, you just need to activate it and get the “Key” from its website for “Free“. It actually detects all the spam comments and put them in the “Spam folder”, you can delete them anytime you want.

 #2. Install “Growmap Anti Spambot Plugin” which will add a “Confirm” Box at the end of your comment form, so if a comment is being posted by human that will only be possible by clicking the “Confirm” box, so it will not allow any “Software” or “Bot” to insert comments automatically. You can see the example of it in our comment form on this blog.

Make changes to the default WordPress Discussion

After installing above two plugins, now go to WordPress Dashboard >> Setting >> Discussion, you’ll find a page like below one, just make sure you keep the setting as strict as possible, because through spam or malware comments, people can destroy your blog within minutes and I’ve experienced it many times.



You can keep the same setting as showing in the above picture, but I’ll recommend you to “Automatically close comments on articles older than 180 days”, because the older articles get more spam comments than the newest ones. You can manually disable comments on the older articles by just clicking “Quick Edit” option in the posts list and disable the comments on a particular post. That’s also a good way to get rid of some spam comments, see the picture below for this:



So this is what you need to actually do for reducing spam comments, which I myself did in the starting of this blog. However, you need to take some more actions, in order to get rid of all spam comments.

To remove the URL field from comment form

Now here is the magic that I used to reduce upto %30 spam comments in a single day, spammers mostly try to post comments for the sake of a backlink, which they usually insert in the “URL or Website” field in the comment form, you can see it here:



So as you can clearly see the visible “Website” field that is mostly used by spammers to create backlinks, and they put their website URL in the “website” field, what you can do to reduce the spam comments dramatically is to remove this field manually from the comment form.

To do this, just follow below steps: 

Copy this piece of PHP code and paste it inside “functions.php” file which you can find by going to Appearance >> Editor in your WordPress dashboard, just copy and paste the below code inside functions.php before the closing ?> PHP tag:

add_filter(‘comment_form_default_fields’, ‘url_filtered’);
function url_filtered($fields)
return $fields;

The above PHP script works on all premium & free WordPress themes, it basically add a filter which removes the “URL” field from the comment form. So by doing this, you’ll reduce the spam comments upto 30% to 40%.

I’ve reduced the spam comments upto 60%, and you can do the same if you apply above tricks mentioned in this post. However, I’m sure, I’ll get rid of all spam comments very soon. I’ll be updating this post regularly with new tricks I implement.

Let me know in the comment section 🙂 if you have any questions or suggestions. Say bye to Spamming!

About Abdul Wali

Abdul Wali is a Web Developer, SEO Consultant and Online Instructor working online for last 6 years on the internet and managing several successful websites. You can contact him via Email or follow him on Facebook. Also add him on .

Check Also


How to Build an Email List with MailChimp?

Do you have a blog? You know how to write content for your blog, and …

  • Ummi

    Thanks for share the great tips. Can you please let me know Can I change comments box in my blog instead default? If yes then How?

    • if you want to change the design of the “comment form” then you can change it by going to style.css file, while if you want to change the entire commenting system or comment form then you can install “Disqus commenting system” or you can search for a plugin.

  • Zaeem Khaliq

    Wow! You Have Now Started WordPress! Great!

    • hey, we already started it, you can find the WordPress tutorials under web development category.

      • Zaeem Khaliq

        Oh! Sorry!

      • Azhar

        Aslam O Alakum

        Sir Me ap se ya pata karna chata ho k poyneer ke account kis terha bnaty he?

        kya ya free of cost he?
        ya koi month’ly charges he
        plz rplay on my Email

  • rizwan

    Hey wali bhai … miany is function ko apni theme main add kia … meri site open tak nhi ho rhi … :'( … functions main ye add kia tu na hi site ka dashboard open ho raha hai aur na hi site open ho rhi hai … :'( … please tell me mian kia karon ?

    • Hello bro,
      agar apke pass problem hogai ha, tu kindly ap apne website k Cpanel “” ma jakar wahan par content/theme k andar jo “function.php” ki file ha us se ic code ko delete kar den jo ap ne pehle add kia tha, ap ki site dubara pehle ki trah kam karegi. ho sakta ha kese plugin ya theme ki wajah se ic code ne apke pass kam nahi kia ya ap ne kesi wrong jaga paste kar dia ha.

  • Mian Muhammad Aziz

    Aslam O Alakum

    Sir jee mera blog ke nam se bana hoa ha me esy .com me karna chahta hun.
    domain khareedna chahta hun,
    se .com me mil rahi ha per wo paisy bary mangte hain,
    Sir me kia karun???
    reply plzzz

    • Ummi

      Mian Muhammad Aziz,

      Domain name purchase karne k liye har company paise leti ha… and agar aap godaddy se purchase karna chate ha to internet par bhot saare godaddy k coupon ha jo first year aapko bhot sasta domain dilate ha… ap wo coupon use kar ke buy kare… under the just PKR 400 ka doamin mile ga.


  • adil

    Please give me some ideas about getting traffic on blog. I am really tried to work on “”. It is almost 3 months old blog and still getting 0 visitor daily. I have done SEO but still against get no response. Can you give me some ideas about getting traffic? Your response would be highly appreciated.

    • Muhammad Numan

      bhai g alexa rank tu aap k blog aur time k hisab say sahi hain,
      mehnat jari rakhain , kewn keh seo k baad bhi aap k blog aik dam oopar nahi aata,
      aahista aahista theek ho jaye ga. agar jaib ijazat day tu advertisement karain apni site ki ,
      google addsence pay ya aur bhi kai tareeqay ho saktay hain.

  • Umar Farooq

    Bohat Khoob Bhai Thanks For Sharing… 🙂

  • Muhammad Numan

    Nice Article Dear,
    Umeed Hain wordpress k hawalay say mazeed tutorials bhi aain gay,

    • Yes, we’ll be at your service in the future, and will create more tutorials on WordPress, even a new course is being considered to be created soon.

  • sudhir

    it is very informative post about reduce spam comment on word press blogs.thanks

  • Zaeem Khaliq

    Please Tell Me That If I Withdraw Money With “Bank Al Habib’s ATM Card”, Can I Receive It In Pakistan?.

    • What are you saying man?

      • Zaeem Khaliq

        I Am Saying That How I Can Withdraw Money From ATM Card Of “Bank Al Habib”, Any Idea About It?. I Don’t Have An UBL Account.

  • Faisal

    Its big, its exciting and its worth an applause! Thanks ….

  • BabL0o JaNi

    Script Not working on Jarida Theme 🙁

    “add_filter(‘comment_form_default_fields’, ‘url_filtered’);
    function url_filtered($fields)
    return $fields;

  • Thank you for this wonderful post on how to reduce Spam Comments in WordPress ,i can finally get rid of those boring comments

  • Muhammad Tahir

    Salam Wali Bhai mujhe website bnwani hai pliz ap kitne pasey lo gay website bnany ke ?

  • thanks but why you didn’t remove website field in your website’s comment box…?

  • wali bhai please ye batai k sahifa theme me author box me author k bio kaise dalte hai.?

  • You didn’t mentioned disqus comment plugin, i use it and after that not see single spam after that

    • Hello,
      I’m very glad having read your comment, Disqus is a great commenting system and I’ll also try to install that and will also publish a post on that on this blog.

  • i always get spam commenting but this post really help for use