localhost账号密码_如何在Localhost上重置WordPress管理员密码

localhost账号密码

Recently, one of our users asked us how to reset WordPress admin password on localhost? If you are running WordPress on localhost and forget your password, then you can’t reset it by email. In this article, we will show you how to reset WordPress admin password on localhost.

最近,我们的一位用户问我们如何在localhost上重置WordPress管理员密码? 如果您在本地主机运行WordPress并忘记了密码,则无法通过电子邮件重置密码。 在本文中,我们将向您展示如何在本地主机上重置WordPress管理员密码。

How to reset WordPress admin password on localhost
为什么密码重置在Localhost上不起作用? (Why Password Reset Doesn’t Work on Localhost?)

The term localhost is used to describe a local server that is not available to the general public. For example: your personal computer.

本地主机一词用于描述本地公众无法使用的本地服务器。 例如:您的个人计算机。

Many WordPress users install WordPress on localhost (in their computer) to test changes, design websites, try out new plugins, and even learn WordPress.

许多WordPress用户在其本地计算机上的本地主机上安装WordPress,以测试更改,设计网站,试用新插件,甚至学习WordPress

If you haven’t tried it, then see our tutorial on how to install WordPress on your Windows computer using WAMP.

如果您还没有尝试过,请参阅我们的教程, 教程如何使用WAMP在Windows计算机上安装WordPress

Mac users can follow instructions in our tutorial on how to install WordPress locally on Mac using MAMP.

Mac用户可以按照我们的教程中有关如何使用MAMP在Mac上本地安装WordPress的说明进行操作

Now here is the problem that some beginners may come across.

现在这是一些初学者可能遇到的问题。

If you forget your WordPress admin password while working on localhost, then you will be NOT be able to reset it using the normal password reset option in WordPress.

如果您在localhost上工作时忘记了WordPress管理员密码,则将无法使用WordPress中的常规密码重置选项来重置它。

The password reset option emails you a link to reset your WordPress password. In order to send emails, your server needs to enable the mail function.

密码重置选项通过电子邮件发送给您一个链接,以重置WordPress密码。 为了发送电子邮件,您的服务器需要启用邮件功能。

This function is turned off by default on local servers which means WordPress will not be able to send the password reset email.

默认情况下,此功能在本地服务器上处于关闭状态,这意味着WordPress将无法发送密码重置电子邮件。

But don’t worry, there’s a way to reset your WordPress password on localhost.

但是不用担心,有一种方法可以在本地主机上重置WordPress密码。

Ready? Let’s get started.

准备? 让我们开始吧。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

在Localhost上重置WordPress管理员密码 (Reset WordPress Admin Password on Localhost)

We will be using phpMyAdmin to reset password on localhost. Simply visit phpMyAdmin control panel by typing this URL in your browser’s address bar:

我们将使用phpMyAdmin在本地主机上重置密码。 只需在浏览器的地址栏中输入以下URL,即可访问phpMyAdmin控制面板:

http://localhost/phpmyadmin/

http://localhost/phpmyadmin/

You will be asked to provide your MySQL username and password. Typically, the username is root with no password.

系统将要求您提供MySQL用户名和密码。 通常,用户名是root,没有密码。

Once you are logged in, you need to select your WordPress database.

登录后,您需要选择WordPress数据库。

Select database

Once you select your database, you will see a list of tables in your WordPress database. Go ahead and click on the browse link next to WordPress users table.

选择数据库后,您将在WordPress数据库中看到表列表。 继续并单击WordPress用户表旁边的浏览链接。

Users table in WordPress database

You will now see the list of entries in your users table. The number of rows depend on how many users are registered on your WordPress site.

现在,您将在用户表中看到条目列表。 行数取决于在您的WordPress网站上注册了多少用户。

Next, you need to click on the Edit link next to the username of the admin user.

接下来,您需要单击管理员用户名旁边的“编辑”链接。

Browsing users table in WordPress DB

This will open up a form where you can edit the information stored in WordPress database for that user.

这将打开一个表单,您可以在其中编辑该用户在WordPress数据库中存储的信息。

Changing user password

Scroll down to user_pass field and type a new password in the ‘value’ column. After that you need to select MD5 in the ‘function’ column.

向下滚动到user_pass字段,然后在“值”列中输入新密码。 之后,您需要在“功能”列中选择MD5

Don’t forget to click on the Go button at the bottom to save your changes.

不要忘记单击底部的“ 转到”按钮以保存更改。

That’s all, you can now login to your WordPress site on localhost using the new password.

就是这样,您现在可以使用新密码登录localhost上的WordPress网站。

If for some reason you’re having a hard time following the phpMyAdmin method, then please look at our guide on how to create a WordPress admin user using your functions.php file. Simply open your theme’s functions.php file and paste the code in the article above, and you’ll be good to go.

如果由于某些原因您在使用phpMyAdmin方法时遇到麻烦,请查看我们的指南, 指南介绍如何使用functions.php文件创建WordPress管理员用户 。 只需打开您主题的functions.php文件,然后将代码粘贴到上面的文章中,就可以了。

We hope this article, helped you learn how to reset WordPress admin password on localhost. You may also want to see our guide on how to how to move WordPress from local server to live site.

我们希望本文能帮助您学习如何在localhost上重置WordPress管理员密码。 您可能还想查看有关如何将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/wp-tutorials/how-to-reset-wordpress-admin-password-on-localhost/

localhost账号密码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值