Wordpress - 用户名未在此站点上注册

Wordpress - The username is not registered on this site

我正在使用 MariaDB 在 VPS 上托管一个 Wordpress 实例。到目前为止,一切似乎都正常,我将尝试登录我的帐户,但它说,

The username {name} is not registered on this site. If you are unsure of your username, try your email address instead.

我以前从未遇到过这个错误,所以我检查了 MariaDB 并且用户在 wp_users table 中。我什至更改了密码以确保密码正确。任何帮助表示赞赏!提前谢谢你。

您还可以创建一个新的管理员用户,通过 SSH 访问您的 VPS。

为此:

  1. 转到您的网站根目录。
  2. 运行 以下命令:

wp user create $username $emailaddress –role=$role

请务必将 ($username 和 $emailaddress) 示例值替换为您自己的自定义值和 ($role) 您希望为用户配置的角色。当命令完成 运行 时,将返回密码,如以下示例输出所示:

exampl3@example.com [~/public_html]# wp user create exampl3 admin@example.com –role=administrator Success: Created user 2enter code here Password: srWCdc3c*(&b

参考下面的table,确定每个角色的能力。这将帮助您在上面的命令中选择将哪个角色设置为用户。

角色描述

Super Admin Can access all administration features (including site network administration). Administrator => Can access all administration features (within a single site). Editor => Can publish and manage posts (including posts by other users). Author => Can publish and manage their own posts. Contributor => Can write and manage their own posts (but cannot publish). Subscriber => Can only manage their profile.

创建帐户后,请尝试重新登录。

希望这会解决您的问题。

此致