recaptcha_如何将reCAPTCHA添加到WordPress评论表

recaptcha

Are you looking to add reCAPTCHA to your WordPress comment form?

您是否正在将reCAPTCHA添加到WordPress注释表单中?

Spam comments have gotten out of control for WordPress websites. As spammers become more sophisticated, they can launch massive spam attacks with little effort.

垃圾邮件评论已失去对WordPress网站的控制。 随着垃圾邮件发送者变得越来越复杂,他们可以毫不费力地发起大规模的垃圾邮件攻击。

Akismet, the popular spam filtering service for WordPress blocks about 7.5 million spam comments every hour. Dealing with spam comments can be frustrating, and some bloggers even choose to completely disable comments on their websites.

Akismet是流行的WordPress垃圾邮件过滤服务,每小时可拦截约750万条垃圾邮件评论。 处理垃圾评论可能会令人沮丧,有些博客甚至选择完全禁用其网站上的评论

Instead of turning off the comments, you can add CAPTCHA to the comment form to practically eliminate spam.

无需关闭评论,您可以将CAPTCHA添加到评论表单中以实际上消除垃圾邮件。

In this tutorial, we’ll show you how to easily add reCAPTCHA to the comment form of your WordPress website.

在本教程中,我们将向您展示如何轻松地将reCAPTCHA添加到WordPress网站的评论表单中。

Add reCAPTCHA to WordPress Comment Form
什么是Google reCAPTCHA? (What is Google reCAPTCHA?)

ReCAPTCHA is an advanced form of CAPTCHA, which is a technology used to differentiate between robots and human users. CAPTCHA is an acronym for “Completely Automated Public Turing test to tell Computers and Humans Apart”.

ReCAPTCHA是CAPTCHA的一种高级形式,它是一种用于区分机器人和人类用户的技术。 CAPTCHA是“完全自动化的公共图灵测试以告诉计算机和人类的区别”的首字母缩写。

Google acquired CAPTCHA technology in 2009 and then later rebranded it as reCAPTCHA. They also made it easier for human users to easily pass the test.

Google于2009年收购了CAPTCHA技术,随后将其更名为reCAPTCHA。 它们还使人类用户更容易通过测试。

Basically, it presents users with a simple check box that they can click to pass the test. If for some reason the test doesn’t validate, then the user will be presented with a challenge identifying text in an image or matching objects in multiple images.

基本上,它为用户提供了一个简单的复选框,他们可以单击以通过测试。 如果由于某种原因该测试无法通过验证,则将向用户提出挑战,以识别图像中的文本或匹配多个图像中的对象。

Google have made reCAPTCHA publicly available, so that website owners can use it on contact forms, login pages, and comment forms to reduce spam.

Google已使reCAPTCHA公开可用,以便网站所有者可以在联系表单登录页面和评论表单上使用它来减少垃圾邮件。

Here’s an example of what reCPATCHA test looks like to majority of your users:

这是大多数用户使用reCPATCHA测试的示例:

Google reCAPTCHA tickbox

It is super easy to setup and add to the WordPress comment form.

设置并添加到WordPress注释表单非常容易。

With that said, let’s see how to easily add reCAPTCHA to the WordPress comment form with step by step instructions.

如此说来,让我们看看如何通过分步说明轻松地将reCAPTCHA添加到WordPress注释表单中。

步骤1:开始 (Step 1: Get Started)

First thing you need to do is install and activate the reCAPTCHA in WP comments form plugin. You can see our step by step guide on how to install a WordPress plugin for detailed instructions.

您需要做的第一件事是在WP注释表单插件中安装并激活reCAPTCHA 。 您可以查看有关如何安装WordPress插件的分步指南, 获取详细说明。

Upon activation, you need to visit Settings » reCAPTCHA in Comments page to configure plugin settings.

激活后,您需要在评论页面中访问设置»reCAPTCHA以配置插件设置。

reCaptcha plugin settings page

The plugin will ask you to provide Google reCAPTCHA API keys. You can create these keys for free from the official reCAPTCHA website.

插件将要求您提供Google reCAPTCHA API密钥。 您可以从reCAPTCHA官方网站免费创建这些密钥。

第2步:注册您的网站以获得reCAPTCHA API密钥 (Step 2: Register Your Website to Get reCAPTCHA API Keys)

The plugin needs 2 Google API keys to add a reCAPTCHA checkbox to your comment form.

该插件需要2个Google API密钥才能在您的评论表单中添加一个reCAPTCHA复选框。

To get the API keys, head over to the Google reCAPTCHA website and click on the ‘Admin Console’ button located at the top right corner of the screen.

要获取API密钥,请转到Google reCAPTCHA网站 ,然后单击屏幕右上角的“管理控制台”按钮。

Visit Google reCAPTCHA website

You’ll be asked to sign in with your Google account. After that, you’ll see the “Register a new site” page where you need to provide some basic information to register your site.

系统会要求您使用您的Google帐户登录。 之后,您将看到“注册新站点”页面,需要在其中提供一些基本信息来注册站点。

First, you need to type your website name or any name of your choice in the Label field. This will help you easily identify your site in the future.

首先,您需要在标签字段中输入您的网站名称或您选择的任何名称。 这将帮助您将来轻松识别您的站点。

Adding a new site

Next, you need to select the reCAPTCHA V2 radio button.

接下来,您需要选择reCAPTCHA V2单选按钮。

This will open up 3 new options. Since you want to add the reCAPTCHA checkbox to your site, you need to select the “I’m not a robot checkbox” option.

这将打开3个新选项。 由于您要将reCAPTCHA复选框添加到您的站点,因此需要选择“我不是机器人复选框”选项。

The Domains textbox allows you to add the domain name of your website where you would like to add the reCAPTCHA checkbox.

通过“域”文本框,您可以在要添加reCAPTCHA复选框的位置添加网站的域名

You can also add multiple domains or subdomains by clicking on the plus (+) icon. This will allow you to use the same API keys on different websites.

您还可以通过单击加号( + )图标来添加多个域或子域 。 这将允许您在不同的网站上使用相同的API密钥。

Add domain and email to reCAPTCHA site

Under Owners, Google will already add your email address. You can also add another email if you want.

在“ 所有者”下 ,Google已经添加了您的电子邮件地址。 您还可以根据需要添加其他电子邮件。

Next, you need to accept the terms of service to use Google reCAPTCHA on your site.

接下来,您需要接受服务条款才能在您的网站上使用Google reCAPTCHA。

Also, select the “Send alerts to owners” checkbox to allow Google to send emails to you if they detect any misconfiguration or suspicious activity.

另外,选中“向所有者发送警报”复选框,以允许Google在检测到任何配置错误或可疑活动时向您发送电子邮件。

Submit and register your WordPress site

Once you’ve filled the form, you can click on the Submit button to register your site.

填写表格后,您可以单击“ 提交”按钮来注册您的网站。

Google reCAPTCHA will now show you a success message along with the site key and the secret key on this page.

Google reCAPTCHA现在将在此页面上向您显示成功消息以及站点密钥和秘密密钥。

Copy site and secret keys

You can now use these API Keys in plugin settings on your website.

现在,您可以在网站上的插件设置中使用这些API密钥。

步骤3:将reCAPTCHA添加到WordPress评论表单 (Step 3: Add reCAPTCHA to WordPress Comment Form)

Head over to Settings » reCAPTCHA in Comments from the left sidebar of your admin panel.

从管理面板的左侧栏中,转到 注释 ”中的“设置” » reCAPTCHA

On the settings page, you need to scroll down to paste the site key and the secret key.

在设置页面上,您需要向下滚动以粘贴站点密钥和秘密密钥。

Add Google API keys to WordPress site

Once you’re done, click on the “Save your Google reCAPTCHA API Keys pair” button to store the API keys.

完成后,单击“保存Google reCAPTCHA API密钥对”按钮以存储API密钥。

The last thing you need to do is enable reCAPTCHA by clicking on the toggle button and then click on Save Changes.

您需要做的最后一件事是通过单击切换按钮,然后单击“ 保存更改”来启用reCAPTCHA。

Activate Google reCAPTCHA on your site

You can also do basic customization by clicking on the reCAPTCHA Customizer option.

您还可以通过单击reCAPTCHA Customizer选项进行基本的自定义

Customize reCAPTCHA appearance

Here you can make changes to the style, size, and alignment of the reCAPTCHA checkbox.

在这里,您可以更改reCAPTCHA复选框的样式,大小和对齐方式。

The plugin also has Antispam Settings option which allows you to decide what to do when the plugin detects an unauthorized comment or security breach.

该插件还具有“ 反垃圾邮件设置”选项,该选项可让您决定当插件检测到未经授权的评论或安全漏洞时该怎么做。

What to do with spam comments

Congratulations, you’ve successfully added reCAPTCHA to your WordPress comment form. You can now check the comment section of your blog posts to confirm that it’s working properly.

恭喜,您已成功将reCAPTCHA添加到WordPress注释表单中。 现在,您可以检查博客文章的评论部分,以确认它是否正常运行。

Note: the reCAPTCHA checkbox will be displayed only to logged out users, so you will need to either log out or open your website in an Incognito window of your browser to preview reCAPTCHA.

注意: reCAPTCHA复选框仅向注销用户显示,因此您需要注销或在浏览器的“隐身”窗口中打开网站才能预览reCAPTCHA。

WordPress comment form with reCAPTCHA enabled

We hope this tutorial helped you learn how to add reCAPTCHA to the WordPress comment form of your website.

我们希望本教程可以帮助您学习如何将reCAPTCHA添加到网站的WordPress评论表单中。

You may also want to check out our guide on how to lazy load comments in WordPress to improve the page loading time.

您可能还需要查看我们的指南, 了解如何在WordPress中延迟加载注释以缩短页面加载时间。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-add-recaptcha-to-wordpress-comment-form/

recaptcha

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
什么是reCATCHA? reCATCHA是由卡内基梅隆大学发明的利用CAPTCHAs 生成的反Spam验证码,这些验证码不是随机产生的无用字符,而是从书籍上扫描下来的不容易识别的扫描字体。 这些字符又是从哪里扫描来的呢? 这就要牵涉到数字图书了,目前的“电子书库”、“电子图书馆”等,其中很大一部分书籍是先使用扫描仪扫描下来,然后使用 OCR 软件进行识别的。而 OCR 的识别能力有限,需要人力来一一校对,而且还不能保证完全正确,因此这样一个工程是十分浩大的。 怎样完成这个浩大的工程呢? 让全世界使用 reCAPTCHA 输入验证码的人来完成。 实现原理:reCAPTCHA 验证码中有2个单词,一个是已经正确识别出的,而另一个是未确定需要校对的单词。如下图示: 当用户输入验证码时,已经识别那个单词需要输入正确才能通过验证,而另一个不确定的单词,用户输入会反馈到 recaptcha.net,当返回一定数量的用户中绝大部分输入一致时,就确认了此单词的正确写法。 因此用户在输入验证码时,不但可以起到防SPAM的作用,还为reCAPTCHA项目校对工作作出了贡献,真是天才的创意呀! 如何在 WordPress 博客上使用reCAPTCHA呢? 对于 WordPress 博客而言,就像标题所写的那样,已经有人编写了相关的插件——WP-reCAPTCHA 该插件拥有不同的主题供选择,分别是红色、白色、黑玻璃及简洁型。 点击这里下载插件,安装方法我就不说了,要说的是使用 reCAPTCHA 必须要注册并获取API Key。下面是获取方法: 1、注册用户 点这里注册一个用户名。 2、使用域名获取 API Key 注册用户成功后,点击 Add a New Site,输入 domain(输入网站域名,二级域名、子目录都可以)获取 Public Key 和 Private Key。 如何在其它类型的博客中使用reCAPTCHA呢? reCAPTCHA 可以用于各种主流编程语言,如PHP、ASP.Net、Perl以及常见程序,如Wordpress、phpBB、Joomla、MediaWiki。你只需点击相应的链接就可以获取到想要的 reCAPTCHA 了。 点击这里了解更多有关 reCAPTCHA 的信息。 总结:就像标题所描述的那样,这是一个创意绝佳的 WordPress 插件,其扫描字体反Spam效果肯定是不错的,现在很多网站都在用,要不你也试一试?!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值