当您被锁定WordPress管理员(wp-admin)时该怎么办

This past weekend, we had a user who was locked out of WordPress Admin panel of their site. While we had written numerous articles covering each specific issue, we realized that we should combine all of them at one place to make it easier for others. In this article, we will show you what to do when you are locked out of WordPress Admin (wp-admin), so you can regain access to your site.

在过去的一个周末,我们有一个用户被锁定在其站点的WordPress管理面板之外。 尽管我们针对每个特定问题撰写了许多文章,但我们意识到我们应该将所有这些文章集中在一个地方,以使其他地方更容易使用。 在本文中,我们将向您展示当您被WordPress Admin(wp-admin)锁定时该怎么办,以便您可以重新获得对网站的访问权限。

There are few reasons why you could be locked out of WordPress admin, so let’s take a look at each of them one by one. Hopefully through this process of elimination, you will be able to figure out the solution for your problem.

有几种原因使您无法与WordPress管理员保持联系,因此让我们逐一查看它们。 希望通过此消除过程,您将能够找出问题的解决方案。

建立数据库连接时出错 (Error Establishing Database Connection)

Are you seeing this error on your entire site? The reason why you get this error is because WordPress is unable to establish a database connection. This could happen for various reasons. It could happen if your database got corrupted for some reason. It could happen if your web hosting server is having some issues. If this is your issue, then please refer to our guide on how to fix the error establishing database connection in WordPress.

您是否在整个网站上看到此错误? 出现此错误的原因是因为WordPress无法建立数据库连接。 这可能由于各种原因而发生。 如果您的数据库由于某种原因而损坏,则可能会发生这种情况。 如果您的网络托管服务器出现问题,则可能会发生。 如果这是您的问题,请参考我们的指南, 了解如何解决在WordPress中建立数据库连接的错误

死亡白屏 (White Screen of Death)

Are you seeing a white screen on your WordPress admin? This issue is often referred to as the WordPress white screen of death. It usually happen because you exhausted the memory limit. It could be caused by a poorly coded plugin or theme. It could also be caused by unreliable web hosting. If you are seeing this error, then please refer to our guide on how to Fix the WordPress white screen of death.

您是否在WordPress管理员上看到白屏? 此问题通常被称为WordPress死亡白屏。 通常是因为耗尽了内存限制。 这可能是由插件或主题编码不正确引起的。 它也可能是由不可靠的网络托管引起的。 如果您看到此错误,请参阅有关如何修复WordPress白屏死机的指南

错误的密码问题 (Incorrect Password Issue)

Sometimes, even when you are typing the correct username and password combination, you won’t be able to login. When you try to reset your password, you never receive the email. This can happen if you were a victim of a hack. We would recommend that you reset your WordPress password from phpMyAdmin.

有时,即使您输入正确的用户名和密码组合,也将无法登录。 当您尝试重设密码时,您永远不会收到电子邮件。 如果您是黑客的受害者,则可能会发生这种情况。 我们建议您从phpMyAdmin重置WordPress密码

This method can be a bit overwhelming for new users, but this is your best bet.

对于新用户来说,此方法可能有点不知所措,但这是您最好的选择。

丢失的管理员权限 (Lost Admin Privileges)

Sometimes, you may be able to login to your WordPress admin, but you don’t see any of the admin functionality. For example, no plugins, no themes etc. This could happen if your user permissions were modified. Often this happen due to a hack. Hackers would infect your site, and then delete your admin privileges. In this case, you should add an admin user to the WordPress database via MySQL (phpMyAdmin).

有时,您也许可以登录WordPress管理员,但是看不到任何管理员功能。 例如,没有插件,没有主题等。如果修改了用户权限,则可能会发生这种情况。 通常,这种情况是由于黑客入侵而发生的。 黑客会感染您的网站,然后删除您的管理员权限。 在这种情况下,您应该通过MySQL(phpMyAdmin)将admin用户添加到WordPress数据库

PHP错误(即语法错误,意外函数等) (PHP Errors (i.e Syntax error, unexpected function etc))

These PHP errors usually happen when you are pasting the code from a website. Often beginners use the built-in WordPress editor from their dashboard. While that feature is pretty handy, but if you don’t know what you are doing, then it can be a disaster. If you pasted a code from a website which locked you out of your WordPress admin, then the first thing you need to do is take a deep breath. Now the only way to fix this issue is using a FTP program (How to use FTP). Once you have installed the FTP program, login to your site. Go to the theme file that you modified. Most likely it was the functions.php file. Now get rid of the code that you added in there. Re-upload the file, and you should be good to go.

当您从网站粘贴代码时,通常会发生这些PHP错误。 通常,初学者从其仪表板使用内置的WordPress编辑器。 虽然该功能非常方便,但是如果您不知道自己在做什么,那将是一场灾难。 如果您从某个网站粘贴了代码,从而将您锁定在WordPress管理员之外,那么您要做的第一件事就是深呼吸。 现在,解决此问题的唯一方法是使用FTP程序( How to use FTP )。 安装FTP程序后,登录到您的站点。 转到您修改的主题文件。 最有可能的是functions.php文件。 现在摆脱在其中添加的代码。 重新上传文件,您应该一切顺利。

Before you go on the site and comment “this code broke my website”, please refer to our beginner’s guide to pasting snippets from the web into WordPress. This is just to prevent you from looking like a fool on the web. Often its hard to admit that the mistake might be yours, so make sure of that first before you point the finger at someone else.

在您访问网站并评论“此代码破坏了我的网站”之前,请参阅我们的初学者指南,以将网络中的摘要粘贴到WordPress中 。 这只是为了防止您看起来像个傻瓜。 通常很难承认该错误可能是您的错误,因此在将手指指向其他人之前,请先确定该错误。

Hopefully after going through all of these possible scenarios, you have already fixed your site. If one of these solutions helped fix your issue, then please let us know in the comments. If you have a solution that is not mentioned in this article, then please share it in the comments as well.

希望在经历所有这些可能的情况之后,您已经修复了网站。 如果这些解决方案之一有助于解决您的问题,请在评论中告知我们。 如果您有本文未提及的解决方案,则也请在评论中分享它。

翻译自: https://www.wpbeginner.com/wp-tutorials/locked-out-of-wordpress-admin/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Vue-admin-better是一个基于Vue.js的后台管理系统模板,如果要将其集成到WordPress后台管理系统中,需要以下步骤: 1. 在WordPress后台中创建一个新的页面,并在其中嵌入Vue-admin-better的前端代码。 2. 使用WordPress的API与Vue-admin-better前端交互,实现数据的传输。 3. 在Vue-admin-better中配置与WordPress后台交互的接口。 4. 在WordPress后台中配置路由,使得Vue-admin-better页面能够正常显示。 注意,这只是一个大概的流程,具体实现过程可能需要根据实际需求进行更多的调整。 ### 回答2: 要将 vue-admin-better 集成为 Wordpress 后台管理系统,需要按照以下步骤进行配置和集成: 1. 首先,确保已经安装了 Wordpress 并配置了相应的数据库和服务器环境。 2. 下载 vue-admin-better 的源代码并解压缩。 3. 将解压后的文件夹复制到 Wordpress 的主题文件夹下(一般位于 wp-content/themes/ 目录下)。 4. 进入 vue-admin-better 文件夹,在命令行中运行 npm install 命令,以安装项目所需的依赖。 5. 在项目的根目录中找到 vue.config.js 文件,并按照需求进行配置。可以修改输出的文件夹、打包路径等。 6. 将 vue-admin-better 的入口文件 main.js 中的路由配置进行修改,以适应 Wordpress 后台管理系统的需求。 7. 根据 Wordpress 后台管理系统的布局、页面和功能需求,修改 vue-admin-better 的组件、样式和逻辑代码。 8. 在 Wordpress 后台登录,进入外观 > 主题 页面,找到并激活刚刚复制到主题文件夹下的 vue-admin-better 主题。 9. 刷新 Wordpress 后台页面,即可看到 vue-admin-better 的界面和功能已经成功集成为 Wordpress 后台管理系统。 需要注意的是,集成 vue-admin-better 时需确保代码的兼容性和稳定性,避免影响到 Wordpress 的正常运行和其他插件的工作。此外,定期更新 vue-admin-better 的版本,以获取最新的优化和功能。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值