How to prevent wordpress spam comments

Source: Internet
Author: User
Keywords WordPress Spam Review

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Using WordPress as a friend of the site is the most headache one thing is spam comments, if not to do some measures, almost every day with a lot of web sites, Chinese and English composition, such as the mix of garbage comments produced, these spam comments seriously affect the quality of the site and user experience, how to prevent wordpress spam comments You can make every comment to review, but this is more trouble, if the program to control, it would be more convenient, Wuhan SEO idler here from the machine mass comments and manual comments two aspects of the introduction of the use of procedures to filter the majority of spam messages, methods are as follows:

Machine Mass Comment

Many people in order to promote the adoption of a measure, wide-spread thin, in fact, the effect is not how good, WordPress can use machine mass blog comment is because the review in the process of submitting to the database is missing the process of verification, so, Effective prevention of machine mass comment is to add some WordPress plug-ins to do validation, we can use similar to the SI CAPTCHA Spam Code plug-in to complete the verification, so that effectively reduce the spam comment. SI CAPTCHA spam Plug-ins You can install their own effect as follows, depending on the effect you need to adjust the CSS style in the console.

  

In addition, you can also use Akismet, bad Behavior, Spam karma and other plug-ins or directly with the program to write a validation code function to the message to filter spam comments. But for the problem appeared again, if the use of validation and other plug-ins, then the user in the process of using the site want to leave a message every time to enter the verification code this is a more troublesome thing, and if the installation of WordPress too many plug-ins will certainly affect the opening speed of the site, how to do? Here Wuhan SEO Idler provides a simple method, WordPress machine message Group must be looking for characteristics, if the change of this feature then the machine can not determine how to leave a message. Method: Change the form submit file name to replace the wp-comments-post.php under the WordPress root directory with the file name such as wp-comments-spam-post.php; Then in the Site Template Comment page form, the action attribute value corresponds to the change to wp-comments-spam-post.php. Www.chenhaoseo.com is also used before the verification code, now changed over.

II. manual spam Message

Do not know why, everyone is a webmaster, WordPress also submitted a URL to enter the window, but a lot of people in the comments are like to write on the content of their web site, looking particularly disgusting, Wuhan SEO processing methods are as follows: (a simple write a JS, prompting users not to enter the comments in the content of the URL)

<script type= "Text/javascript" > Function Checkurl () {var Strregex = "(. com|.cn|.info|www.|cc|http)"; If you want to not allow the content of the word, add directly, the middle with | var objexp=new RegExp (Strregex); var str = document.getElementById ("comment"). value;//if your form's ID is not comment, modify it to your own if you do not manually add id= "comment" if ( Objexp.test (str) ==true) {alert (' Dude, be ruthless! Comment Content does not allow the URL "/" Prompt content can be modified to return false; }} </script>

Paste this part of the JS content into the comment template and write onsubmit= "return Checkurl ()" In the Comment form tab. The effect is as follows:

  

If there is a URL in the comment content, pop-up prompts. If you are unfamiliar with the program, before using this method, please do your own file backup. If you have any problems in the use process, please leave a message. How to prevent wordpress spam comments on the written here, hope to bring help to everyone, but also hope that we respect each other, do not move in people's blog blindly write messages, if we all webmaster each other's point of view, I think so we webmaster also need not for wordpress spam message fidgety it, This article by Wuhan SEO http://www.chenhaoseo.com/seozatan/899.html original, reprint please famous source

Related Article

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.