注册captcha什么意思_如何在WordPress登录和注册表格中添加CAPTCHA

注册captcha什么意思

Do you want to add CAPTCHA to login and registration forms on your WordPress site?

您是否要在WordPress网站上将CAPTCHA添加到登录和注册表格中?

Often WordPress login page and user registration page are a prime target for hackers, spammers, and brute force attacks.

WordPress登录页面和用户注册页面通常是黑客,垃圾邮件发送者和暴力攻击的主要目标。

The attackers motivation is often to gain unauthorized access to your WordPress admin area to distribute malware or in other cases crash the entire network of websites hosted with a specific web hosting company to collect ransom.

攻击者的动机通常是获得对WordPress管理区域的未经授权的访问以分发恶意软件,或者在其他情况下,使由特定Web托管公司托管的整个网站网络崩溃,以收集赎金。

One way to avoid these attacks is by using CAPTCHA which effectively blocks spambots and protects your site from being hacked.

避免这些攻击的一种方法是使用验证码,该验证码可以有效阻止垃圾信息,并保护您的网站免遭黑客攻击。

In this article, we will show you how to easily add CAPTCHA in WordPress login and registration form.

在本文中,我们将向您展示如何在WordPress登录和注册表单中轻松添加CAPTCHA。

Adding CAPTCHA in WordPress Login and Registration Form
什么是验证码? (What is CAPTCHA?)

A CAPTCHA is a computer program used to distinguish between human and automated users. It does that by presenting a test that would be quite easy for a human user to pass but way harder and almost impossible for automated scripts to get right.

CAPTCHA是用于区分人工用户和自动用户的计算机程序。 通过提供这样的测试来做到这一点,该测试对于人类用户而言相当容易通过,但是对于自动脚本来说,通过正确的测试则更加困难且几乎不可能。

In the earlier days of the CAPTCHA, users were asked to enter the text they saw in an image. This image displayed random letters, words, or numbers in a distorted style.

在验证码的早期,要求用户输入他们在图像中看到的文本。 此图像以变形的样式显示了随机的字母,单词或数字。

Old style CAPTCHA

Later, a newer technology called reCAPTCHA was introduced. It showed random words as a challenge and used the user input to help digitalize books.

后来,引入了一种称为reCAPTCHA的更新技术。 它显示随机单词是一个挑战,并使用用户输入来帮助数字化书籍。

reCAPTCHA preview

This technology was acquired by Google in 2009. Since then, it has helped digitalized thousands of books and complete New York Times archives.

这项技术于2009年被Google收购。此后,它已帮助数以千计的图书数字化并完成了《纽约时报》的档案。

However, these new CAPTCHAs were still annoying and ruined the user experience on websites.

但是,这些新的验证码仍然令人讨厌,并且破坏了网站上的用户体验。

To fix this, Google introduced “No CAPTCHA reCAPTCHA” which uses AI and user interactions to catch spambots.

为了解决这个问题,Google推出了“ No CAPTCHA reCAPTCHA”,它使用AI和用户交互来捕获垃圾邮件。

NoCaptcha reCAPTCHA

It shows an easier checkbox for human users to click on. For other suspicious traffic, it would show a more difficult CAPTCHA like identifying objects in images.

它为人类用户显示了一个更简单的复选框。 对于其他可疑流量,它将显示出更困难的验证码,例如识别图像中的对象。

That being said, let’s take a look at how WordPress websites can improve security with CAPTCHA.

话虽如此,让我们看看WordPress网站如何通过CAPTCHA改善安全性。

为什么要使用CAPTCHA进行WordPress登录和注册? (Why Use CAPTCHA for WordPress Login and Registration?)

WordPress login and registration pages are an easy target for spammers, wannabe hackers, and brute force attacks.

WordPress登录和注册页面是垃圾邮件发送者,想成为黑客和暴力攻击的简单目标。

That’s because WordPress is the most popular website builder in the world, which makes it a common target for malicious attempts.

这是因为WordPress是世界上最受欢迎的网站构建器 ,这使其成为恶意尝试的常见目标。

The easiest solution to protect your WordPress site is by using a WordPress firewall plugin like Sucuri. It will block bad traffic from reaching your website and prevent unauthorized access.

保护您的WordPress网站的最简单解决方案是使用WordPress防火墙插件(Sucuri) 。 它将阻止不良流量访问您的网站,并防止未经授权的访问。

Another solution is to add a secondary layer of password protection on WordPress login and registration pages. However, the problem with this method is that you’ll have to share that second password with each user, and this simply doesn’t scale for large multi-author blogs or membership sites.

另一个解决方案是在WordPress登录和注册页面添加第二层密码保护 。 但是,此方法的问题在于您必须与每个用户共享第二个密码,而这根本无法扩展到大型的多作者博客或会员站点。

CAPTCHA provides an easier alternative to those solutions. It uses Google’s AI technologies to detect genuine visitors and present CAPTCHA challenges to suspicious users.

CAPTCHA为这些解决方案提供了更简单的替代方案。 它使用Google的AI技术来检测真正的访问者,并向可疑用户提出CAPTCHA挑战。

That being said, let’s take a look at how to easily add CAPTCHA to your WordPress site.

话虽如此,让我们看一下如何轻松地将CAPTCHA添加到您的WordPress网站。

默认与自定义WordPress登录和注册表格 (Default vs Custom WordPress Login and Registration Form)

The default WordPress login and registration form provide a basic set of features.

默认的WordPress登录和注册表单提供了一组基本功能。

The login page allow users to access the backend of your website according to their respective user roles and permissions.

登录页面允许用户根据他们各自的用户角色和权限访问您网站的后端。

Default WordPress Login Page

The default WordPress registration form lets visitors create an account on your site. Once they are registered, they can also login to your website backend and perform specific tasks allowed by their user role.

默认的WordPress注册表格可让访问者在您的网站上创建一个帐户。 一旦注册,他们还可以登录到您的网站后端并执行其用户角色允许的特定任务。

Default WordPress User Registration Page

A lot of website owners want to customize the default WordPress login and registration page with their own logo, styles, etc. They use one of the many plugins to create their own custom login and registration page to replace the default ones.

许多网站所有者希望使用自己的徽标,样式等来自定义默认的WordPress登录和注册页面。他们使用众多插件之一来创建自己的自定义登录和注册页面,以替换默认的登录和注册页面。

Whether you’re using the default pages or custom ones, we have got you covered.

无论您使用的是默认页面还是自定义页面,我们都可以满足您的要求。

In this guide, we will show you how to set up reCAPTCHA for both default and custom login and registration pages in WordPress.

在本指南中,我们将向您展示如何为WordPress中的默认和自定义登录及注册页面设置reCAPTCHA。

Let’s get started by adding reCAPTCHA in default WordPress login and registration form.

让我们开始吧,在默认的WordPress登录和注册表单中添加reCAPTCHA。

将reCAPTCHA添加到默认的WordPress登录和注册表单 (Adding reCAPTCHA to Default WordPress Login and Registration Form)

First thing you need to do is install and activate the Advanced noCAPTCHA & reCAPTCHA (v2 & V3) plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活高级noCAPTCHA和reCAPTCHA(v2和V3)插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Once the plugin is activated, you need to visit Settings » Advanced noCAPTCHA & Invisible CAPTCHA page from your admin panel. Once done, WordPress will take you to the plugin’s general settings page.

激活插件后,您需要从管理面板访问“设置”»“高级noCAPTCHA和不可见的验证码”页面。 完成后,WordPress将带您进入插件的常规设置页面。

Advanced noCaptcha & invisible Captcha (v2 & v3) Settings

From there, you need to choose a Google reCAPTCHA version and find reCAPTCHA API keys to enable the service on your site.

从那里,您需要选择一个Google reCAPTCHA版本并找到reCAPTCHA API密钥以在您的站点上启用该服务。

We recommend using v2 because we believe v3 is not as stable just yet.

我们建议使用v2,因为我们认为v3尚不那么稳定。

To obtain these API keys, you need to visit reCAPTCHA website and click on the ‘Admin Console’ button.

要获取这些API密钥,您需要访问reCAPTCHA网站 ,然后单击“管理控制台”按钮。

Visit Google reCAPTCHA website

On the next screen, Google will ask you to sign in to your account. Once you are logged in, you will see the ‘Register a new site’ page.

在下一个屏幕上,Google会要求您登录帐户。 登录后,您将看到“注册新站点”页面。

Register a New Site for Google reCAPTCHA

First, you need to enter your website name in the Label field. After that, you need to select a reCAPTCHA type. For example, we will choose reCAPTCHA v2 ‘I’m not a robot’ checkbox.

首先,您需要在标签字段中输入您的网站名称。 之后,您需要选择一个reCAPTCHA类型。 例如,我们将选择reCAPTCHA v2“我不是机器人”复选框。

Next, you need to enter your domain name under the Domains section. Make sure to enter your domain name without ‘https://www.’

接下来,您需要在“域”部分下输入您的域名。 确保输入不带“ https:// www”的域名。

Add Domain Name and Owner for Google reCAPTCHA

The Owners section shows your email address and also lets you add a new owner.

“所有者”部分显示了您的电子邮件地址,还允许您添加新的所有者。

After that you need to check the box next to ‘Accept the reCAPTCHA Terms of Service’. Optionally, you can also check the ‘Send alerts to owners’ box to receive email alerts about suspicious traffic or captcha misconfiguration on your site.

之后,您需要选中“接受reCAPTCHA服务条款”旁边的框。 (可选)您还可以选中“向所有者发送警报”框,以接收有关站点上可疑流量或验证码配置错误的电子邮件警报。

Submit and register your WordPress site

Once done, click on the Submit button.

完成后,单击“提交”按钮。

Next, you will see a success message along with the site and secret keys that you can use on your site.

接下来,您将看到一条成功消息,以及可以在您的站点上使用的站点和密钥。

Google reCAPTCHA API Keys

Now you need to open your WordPress dashboard and go to Settings » Advanced noCAPTCHA & Invisible CAPTCHA page to set up Google reCAPTCHA.

现在,您需要打开WordPress仪表板,然后转到“设置”»“高级noCAPTCHA和不可见的验证码”页面来设置Google reCAPTCHA。

Once you are on the plugin settings page, you need to choose the Google reCAPTCHA version first. Since we’ve registered our site for Google reCAPTCHA v2 ‘I’m not a robot,’ we will select that option from the dropdown.

进入插件设置页面后,您需要首先选择Google reCAPTCHA版本。 由于我们已经为Google reCAPTCHA v2注册了网站“我不是机器人”,因此我们将从下拉列表中选择该选项。

Choose Google reCAPTCHA V2 in Advanced noCAPTCHA & Invisible CAPTCHA (v2 & v3)

After that, you need to enter the site key and secret key provided by Google reCAPTCHA earlier.

之后,您需要更早输入Google reCAPTCHA提供的站点密钥和秘密密钥。

Enter Site Key and Secret Key to Add reCAPTCHA to WordPress

Next, you will see the ‘Enabled Forms’ option. Check the box next to the forms where you want to enable the Google reCAPTCHA. Here, we will choose the Login Form and Registration Form.

接下来,您将看到“已启用表单”选项。 选中您要启用Google reCAPTCHA的表单旁边的框。 在这里,我们将选择登录表单和注册表单。

Enable reCAPTCHA for Default WordPress Login and Registration Form

After that, you can scroll down the page to review other options. Once you’re done with the customization, click on the ‘Save Changes’ button at the bottom.

之后,您可以向下滚动页面以查看其他选项。 完成自定义后,点击底部的“保存更改”按钮。

That’s it! You have successfully added reCAPTCHA in default WordPress login and registration form. To preview it, you can open your WordPress login URL on your browser. For example; www.example.com/wp-login.php.

而已! 您已成功在默认的WordPress登录和注册表单中添加了reCAPTCHA。 要预览,可以在浏览器中打开WordPress登录URL 。 例如; www.example.com/wp-login.php。

WordPress Login Page With Google reCAPTCHA

If you want to check the reCAPTCHA on the registration form, then click on the Register link below the login form. After that, the WordPress registration form will open, and you can see how reCAPTCHA works.

如果要检查注册表单上的reCAPTCHA,请单击登录表单下方的“注册”链接。 之后,将打开WordPress注册表单,您可以看到reCAPTCHA的工作方式。

WordPress Registration Page with reCAPTCHA
在自定义WordPress登录和注册表单中设置reCAPTCHA (Setting Up reCAPTCHA in Custom WordPress Login and Registration Form)

As we mentioned earlier, custom WordPress login and registration forms offer more user-friendly membership options to your website visitors.

如前所述,自定义WordPress登录和注册表单为您的网站访问者提供了更加用户友好的成员资格选项。

First, you can allow users to register or login to your website from the frontend. This improves user experience and lets you keep the same overall design experience across the website.

首先,您可以允许用户从前端注册或登录到您的网站。 这样可以改善用户体验,并使您在整个网站上保持相同的总体设计体验。

Next, it lets you add your website logo and customize the login and registration page in your style.

接下来,它使您可以添加网站徽标并以您的样式自定义登录和注册页面。

Creating a custom WordPress login form and user registration form is easy with the most user-friendly WordPress form plugin, WPForms (used by over 2 million websites).

使用最易于使用的WordPress表单插件WPForms (有超过200万个网站使用),可以轻松创建自定义WordPress登录表单和用户注册表单。

To get started, install and activate the WPForms plugin on your WordPress site. For more details, see our step by step guide on how to install a WordPress plugin.

首先,请在WordPress网站上安装并激活WPForms插件 。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

To create custom WordPress user registration form quickly, you need to get at least WPForms Pro plan.

要快速创建自定义WordPress用户注册表单,您至少需要获得WPForms Pro计划

Upon activation, head over to WPForms » Settings page to enter your WPForms license key. You can get this key from your account area on the WPForms website.

激活后,转到WPForms»设置页面以输入WPForms许可证密钥。 您可以从WPForms网站上的帐户区域获取此密钥。

Add WPForms license key

After that, click on the reCAPTCHA option at the top to configure reCAPTCHA for your custom made WordPress forms. First, you need to choose a reCAPTCHA type.

之后,单击顶部的reCAPTCHA选项为您的定制WordPress表单配置reCAPTCHA。 首先,您需要选择一个reCAPTCHA类型。

Since we chose v2 earlier, we will choose reCAPTCHA v3 here in this example, but please know that our recommendation is still v2.

由于我们之前选择了v2,因此在此示例中,我们将在此处选择reCAPTCHA v3,但是请注意,我们的建议仍然是v2。

WPForms reCAPTCHA Settings - Choose V3

After that, you will see the site key and secret key field. To get these keys, you need to register your site on Google reCAPTCHA website.

之后,您将看到站点密钥和秘密密钥字段。 要获取这些密钥,您需要在Google reCAPTCHA网站上注册您的网站。

Go to the Google reCAPTCHA website and then click on the Admin Console button at the top right corner.

转到Google reCAPTCHA网站 ,然后单击右上角的管理控制台按钮。

Visit Google reCAPTCHA website

After that, Google will ask you to sign in to your account. Once done, you will see the ‘Register a new site’ page.

之后,Google会要求您登录您的帐户。 完成后,您将看到“注册新站点”页面。

Register a New Site for Google reCAPTCHA

Enter your website name and then select reCAPTCHA v3 from the reCAPTCHA type option.

输入您的网站名称,然后从reCAPTCHA类型选项中选择reCAPTCHA v3。

Next, you need to enter your domain name (without https://www.) as shown in the screenshot below.

接下来,您需要输入域名(不带https:// www。),如下面的屏幕快照所示。

Add Domain Name and Owner for Google reCAPTCHA

If you want to add another Gmail user as the owner of the reCAPTCHA, then you can add the email address under the Owners section.

如果您要添加其他Gmail用户作为reCAPTCHA的所有者,则可以在“所有者”部分下添加电子邮件地址。

After that, you need to accept the reCAPTCHA terms of service. You can also check the box next to ‘Send alerts to owners’ option to get notification emails from Google about suspicious traffic on your site.

之后,您需要接受reCAPTCHA服务条款。 您还可以选中“向所有者发送警报”选项旁边的框,以获取有关您网站上可疑流量的Google通知电子邮件。

Submit and register your WordPress site

Once done, click on the Submit button.

完成后,单击“提交”按钮。

After that, Google will show a success message along with the site key and the secret key to add reCAPTCHA to your site.

之后,Google将显示一条成功消息以及网站密钥和密钥,以将reCAPTCHA添加到您的网站。

Google reCAPTCHA API Keys

Now that you have the Google reCAPTCHA API keys, you need to open WPForms » Settings » reCAPTCHA page in your WordPress dashboard.

有了Google reCAPTCHA API密钥后,您需要在WordPress仪表板中打开WPForms»设置»reCAPTCHA页面。

WPForms reCAPTCHA Settings WordPress

On the WPForms reCAPTCHA settings page, enter the site key and secret key. Once done, save your settings.

在WPForms reCAPTCHA设置页面上,输入站点密钥和秘密密钥。 完成后,保存您的设置。

Now that you have successfully added reCAPTCHA on WPForms, you can easily enable reCAPTCHA in your custom login form, user registration form, or any form built with WPForms.

现在,您已经在WPForms上成功添加了reCAPTCHA,您可以轻松地在自定义登录表单,用户注册表单或使用WPForms构建的任何表单中启用reCAPTCHA。

So now let’s go ahead and create a custom WordPress registration form.

现在,让我们继续创建自定义WordPress注册表单。

Visit WPForms » Addons page. Locate ‘User Registration Addon’ and click on the ‘Install Addon’.

访问WPForms»插件页面。 找到“用户注册插件”,然后单击“安装插件”。

Install WPForms User Registration Addon

After that, WPForms will download and install the addon. Once you see the User Registration Addon’s status ‘Active,’ you are ready to add a new user registration form.

之后,WPForms将下载并安装插件。 一旦看到用户注册插件的状态为“有效”,就可以添加新的用户注册表格。

Now you need to go to WPForms » Add New to launch the WPForms Builder. On the WPForms setup page, select ‘User Registration Form’ template.

现在,您需要转到WPForms»添加新的以启动WPForms Builder。 在WPForms设置页面上,选择“用户注册表单”模板。

Select User Registration Form Template WPForms

After that, WPForms will automatically build a custom user registration form and open the Form Setup page.

之后,WPForms将自动构建自定义用户注册表单并打开“表单设置”页面。

User Registration Form Builder WPForms

Now you can customize your form by adding new fields or editing the field options. If you like the default form, then you can use it without making any changes.

现在,您可以通过添加新字段或编辑字段选项来自定义表单。 如果您喜欢默认格式,则可以直接使用它而无需进行任何更改。

Next, you need to click on the Settings option to configure your form settings and enable the Google reCAPTCHA.

接下来,您需要单击“设置”选项以配置表单设置并启用Google reCAPTCHA。

On the General Settings page, you can edit your form name, add form description, edit the Submit button text, and more. At the bottom, you can see checkboxes including Enable Google v3 reCAPTCHA box.

在“常规设置”页面上,您可以编辑表单名称,添加表单描述,编辑“提交”按钮文本等等。 在底部,您可以看到包括启用Google v3 reCAPTCHA复选框的复选框。

Enable Google reCAPTCHA on WordPress Custom Registration Form

Simply check the box to enable Google reCAPTCHA in your user registration form. Once done, click on the Save button at the top right corner.

只需选中该复选框以在您的用户注册表格中启用Google reCAPTCHA。 完成后,单击右上角的“保存”按钮。

Save Your Custom User Registration Form

After that, you can close the form builder by clicking on the Close button next to the Save button.

之后,您可以通过单击“保存”按钮旁边的“关闭”按钮来关闭表单构建器。

That’s it! You have created a custom WordPress user registration form and also added reCAPTCHA to it.

而已! 您已经创建了自定义WordPress用户注册表单,并且还向其中添加了reCAPTCHA。

The next thing you need to do is add the custom user registration form on your site. You can add the form to your posts, pages, or any widget-ready area easily. For example, we will create a new page and add the form to it.

接下来,您需要在网站上添加自定义用户注册表格。 您可以轻松地将表单添加到帖子,页面或任何可用于小部件的区域。 例如,我们将创建一个新页面并将表单添加到其中。

Go to Pages » Add New page from your WordPress dashboard to build a new page. On your page edit screen, click on the ‘Add New Block’ icon and select the WPForms block.

转到页面»从WordPress仪表板添加新页面以构建新页面。 在页面编辑屏幕上,单击“添加新块”图标,然后选择WPForms块。

Add WPForms Block to WordPress Page Editor

Next, you can see the WPForms widget added to your page edit screen. You just need to select the Custom User Registration Form you created earlier. After that, the widget will automatically load the form in the page editor.

接下来,您可以看到WPForms小部件已添加到页面编辑屏幕。 您只需要选择您先前创建的“自定义用户注册表”即可。 之后,小部件将自动在页面编辑器中加载表单。

Add Custom User Registration Form to WordPress Page

Next, you can add other necessary content and publish the page.

接下来,您可以添加其他必要的内容并发布页面。

Now you can open the page on your web browser to see the custom user registration form with Google reCAPTCHA in action.

现在,您可以在网络浏览器上打开该页面,以查看使用Google reCAPTCHA的自定义用户注册表单。

Since we chose reCAPTCHA v3 in this example, you won’t see a Google reCAPTCHA checkbox like ‘I’m not a robot’. This is because because reCAPTCHA v3 works in the background, but you will still see a small badge at the bottom right corner.

由于我们在此示例中选择了reCAPTCHA v3,因此您不会看到“我不是机器人”之类的Google reCAPTCHA复选框。 这是因为reCAPTCHA v3在后台运行,但是您仍然会在右下角看到一个小徽章。

Custom WordPress User Registration Form with Google reCAPTCHA

The process of creating a custom login form is almost the same. The only difference is that you need to choose the User Login Form template from the WPForms setup page.

创建自定义登录表单的过程几乎相同。 唯一的区别是您需要从WPForms设置页面中选择User Login Form模板。

Select User Login Form Template WPForms

After that, the whole process is the same. For more details, you can see our guide on how to create a custom login page in WordPress.

之后,整个过程是相同的。 有关更多详细信息,请参阅我们的指南,以了解如何在WordPress中创建自定义登录页面

Custom WordPress Login Form With reCAPTCHA

We hope this article helped you to learn how to add CAPTCHA in WordPress login and registration forms. You may also want to see our ultimate WordPress security guide to strengthen your overall website security.

我们希望本文能帮助您学习如何在WordPress登录和注册表单中添加CAPTCHA。 您可能还希望查看我们的终极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-captcha-in-wordpress-login-and-registration-form/

注册captcha什么意思

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值