wordpress访问限制_如何在WordPress中限制仪表板访问

wordpress访问限制

Did you ever want to allow user registration on your WordPress site without giving dashboard access? When a user creates an account on a WordPress site, they get access to the WordPress admin area also known as the dashboard. In this article, we will show you how to limit dashboard access in WordPress.

您是否曾经想在不授予仪表板访问权限的情况下允许用户在WordPress网站上注册? 当用户在WordPress网站上创建帐户时,他们可以访问WordPress管理区域(也称为仪表板)。 在本文中,我们将向您展示如何限制WordPress中的仪表板访问。

为什么要限制仪表板访问? (Why Limit Dashboard Access?)

Only users you trust should have access to the admin area of your WordPress site. If you are running a multi-author blog, then you may want to give access to editors and contributors but not to subscribers.

只有您信任的用户才能访问WordPress网站的管理区域。 如果您正在运行一个多作者博客,则可能需要授予编辑者和贡献者访问权,但不授予订阅者访问权。

Even when you are giving some users access to the admin area, you can still control what they can or cannot see on the dashboard. We will discuss this later in the article.

即使您授予某些用户访问管理区域的权限,您仍然可以控制他们在仪表板上可以看到或看不到的内容。 我们将在本文后面讨论。

在WordPress中限制仪表板访问 (Limiting Dashboard Access in WordPress)

First thing you need to do is install and activate the Remove Dashboard Access plugin. Upon activation, you need to go to Settings » Dashboard Access to configure the plugin.

您需要做的第一件事是安装并激活“ 删除仪表板访问”插件。 激活后,您需要转到“设置”»“仪表板访问”以配置插件。

Configuring Limit Dashboard Access plugin

Remove Dashboard Access plugin allows you to choose user roles that can get access to the dashboard. You can choose administrators, editors and administrators, or authors, editors, and administrators.

删除仪表板访问插件可让您选择可以访问仪表板的用户角色 。 您可以选择管理员,编辑者和管理员,或者作者,编辑者和管理员。

Alternatively, you can also limit access by capability. Capabilities are the actions a user can do on your WordPress site. To understand user roles and capabilities in WordPress, check out our guide on how to add or remove capabilities from user roles in WordPress.

或者,您也可以按功能限制访问。 功能是用户可以在您的WordPress网站上执行的操作。 要了解WordPress中的用户角色和功能,请查看有关如何在WordPress中的用户角色添加或删除功能的指南。

The next option is to choose a redirect URL. This option allows you to redirect disallowed users to any page on your website.

下一个选项是选择重定向URL。 此选项使您可以将不允许访问的用户重定向到您网站上的任何页面。

If you want to allow users to edit their profiles, then you need to check the box next to user profile access. Selecting this option will disable the URL redirect feature. The plugin will redirect disallowed users to profile edit screen instead of redirect URL you entered earlier.

如果要允许用户编辑其个人资料,则需要选中用户个人资料访问权限旁边的框。 选择此选项将禁用URL重定向功能。 该插件会将不允许的用户重定向到个人资料编辑屏幕,而不是您之前输入的重定向URL。

Once you are satisfied, click on the save changes button to store your settings.

满意后,单击“保存更改”按钮以存储您的设置。

That’s all. Now only users with your selected user role or capability can access the WordPress dashboard.

就这样。 现在,只有具有您选择的用户角色或功能的用户才能访问WordPress仪表板。

在WordPress中隐藏管理区域中的项目 (Hiding Items from Admin Area in WordPress)

Sometimes you may want to restrict what a user sees or can edit in your WordPress admin area.

有时,您可能想限制用户在WordPress管理区域中看到或可以编辑的内容。

You can hide and control what users can see in the admin area of your WordPress site. Simply check out our guide on how to hide unnecessary items from WordPress admin with Adminimize.

您可以隐藏和控制用户可以在WordPress网站的管理区域中看到的内容。 只需查看我们的指南,了解如何使用Adminimize从WordPress管理员隐藏不必要的项目

使用.htaccess保护WordPress管理员目录 (Protecting WordPress Admin Directory with .htaccess)

Another way to protect WordPress admin directory is by adding another layer of password protection. This method asks users to provide a username and password before they can enter wp-admin directory.

保护WordPress管理员目录的另一种方法是添加另一层密码保护。 此方法要求用户提供用户名和密码,然后才能进入wp-admin目录。

This method does not offer a user interface to control which users can access the admin area. However, it is generally considered more secure. If you are the only author on your site or have a very limited set of users use this method.

此方法不提供用于控制哪些用户可以访问管理区域的用户界面。 但是,通常认为它更安全。 如果您是网站上的唯一作者,或者用户数量非常有限,请使用此方法。

Checkout our detailed tutorial on how to password protect your WordPress wp-admin directory.

查看有关如何密码保护WordPress wp-admin目录的详细教程。

We hope this article helped you limit dashboard access on your WordPress site.

我们希望本文能帮助您限制对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 Google+.

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

翻译自: https://www.wpbeginner.com/plugins/how-to-limit-dashboard-access-in-wordpress/

wordpress访问限制

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值