wordpress修复插件_如何修复WordPress中的“您确定要这样做吗”错误

wordpress修复插件

Every once in a while, you might encounter a WordPress error like error establishing database connection or memory exhausted error. These errors are somewhat helpful because they tell you exactly what the problem is.

每隔一段时间,您可能会遇到WordPress错误,例如建立数据库连接 错误内存耗尽错误 。 这些错误会有所帮助,因为它们可以准确告诉您问题所在。

On the other hand, there are unhelpful errors like “Are you sure you want to do this”.

另一方面,还有一些无用的错误,例如“确定要执行此操作”。

There are too many factors that can lead to this error. This is why WordPress is unable to provide any information to point you in the right direction to fix it.

有太多因素可能导致此错误。 这就是WordPress无法提供任何信息以指出正确方向进行修复的原因。

In this article, we will show you how to investigate and fix “Are you sure you want to do this” error in WordPress.

在本文中,我们将向您展示如何调查和修复WordPress中的“确定要执行此操作”错误。

Error - Are you sure you want to do this
是什么原因引起的:“您确定要这样做吗?” 错误? (What causes the: “Are you sure you want to do this?” error?)

‘Are you sure you want to do this?’ error usually appears when nonce verification fails and the most likely candidates to cause this error are plugins and themes not using this feature properly.

'你确定你要这么做吗?' 错误数通常会在随机数验证失败时出现,并且最有可能导致此错误的原因是插件和主题未正确使用此功能。

Nonces are unique keys which add a security layer to protect WordPress URLs, forms, and ajax calls from abuse. They ensure that a script is originating from your website and not an external source like a hacker trying to gain access to your website.

随机数是唯一的密钥,可添加安全层以保护WordPress URL,表单和Ajax调用免受滥用。 它们可确保脚本源自您的网站,而不是来自试图获取您网站访问权限的外部来源(例如黑客)。

如何解决“您确定要这样做吗?” 错误 (How to Fix “Are Your Sure You Want to Do This?” Error)

Most commonly, this error is caused by a plugin or theme that is installed on your site. To investigate which plugin or theme is causing the issue, you will need to deactivate all your plugins.

最常见的是,此错误是由您网站上安装的插件或主题引起的。 要调查导致问题的插件或主题,您将需要停用所有插件

调查插件 (Investigating Plugins)

First, you need to deactivate all WordPress plugins and make sure that WordPress is unable to locate any installed plugin.

首先,您需要停用所有WordPress插件,并确保WordPress无法找到任何已安装的插件。

Simply connect to your WordPress hosting account using an FTP client.

只需使用FTP客户端连接到您的WordPress托管帐户即可。

Once connected, go to the wp-content folder and rename plugins folder to plugins.deactivated.

连接后,转到wp-content文件夹,并将plugins文件夹重命名为plugins.deactivated

Rename plugins folder to deactivate all plugins

After that, you need to go back to the plugins page in your WordPress admin area. You will see a notification for all your plugins which are now deactivated.

之后,您需要返回WordPress管理区域中的插件页面。 您将看到有关所有已停用的插件的通知。

Plugins deactivated in WordPress

Now that all your plugins are properly uninstalled and deactivated, you can try to reproduce the error.


现在,您的所有插件均已正确卸载并停用,您可以尝试重现该错误。

If the error does not appear again, then this means that one of the plugins on your website was causing the issue. To figure out which plugin was causing the issue, go back to your FTP client and rename plugins.deactivated folder back to plugins.

如果错误不再出现,则表明您网站上的一个插件引起了该问题。 要弄清楚是哪个插件导致了问题,请返回FTP客户端,然后将plugins.deactivated文件夹重命名为plugins

After that, visit the plugins page in your WordPress admin area and activate each plugin one by one. You need to try to reproduce the error after activating each plugin until you find the plugin that is causing the issue.

之后,请访问WordPress管理区域中的插件页面,并逐个激活每个插件。 在激活每个插件之后,您需要尝试重现该错误,直到找到导致该问题的插件。

Yes, this sounds like a time consuming task, but it is the easiest way for beginners to find a misbehaving WordPress plugin.

是的,这听起来很耗时,但这是初学者找到行为异常的WordPress插件的最简单方法。

调查主题 (Investigating Themes)

If the plugins were not causing this issue, then it might be your theme that is causing the ‘Are you sure you want to do this’ error.

如果插件没有引起此问题,则可能是您的主题导致了“确定要执行此操作”错误。

You can investigate the theme causing this issue by repeating the same procedure you did for plugins. First, you need to connect to your website using an FTP client and download your currently active theme to your computer as a backup.

您可以通过重复执行与插件相同的过程来调查导致此问题的主题。 首先,您需要使用FTP客户端连接到您的网站,并将当前活动的主题下载到计算机作为备份。

Once you have backed up your theme, you can safely delete it from your web server.

备份主题后,就可以从Web服务器中安全删除它。

Now visit Appearance » Themes page in your WordPress admin area, and you will see a notification: ‘The active theme is broken. Reverting to the default theme’.

现在访问WordPress管理区域中的外观»主题页面,您将看到一条通知:“活动主题已损坏。 还原为默认主题”。

Theme deactivated

WordPress will now start using the default theme like Twenty Seventeen for your website.

WordPress现在将开始为您的网站使用默认主题,例如“二十一岁”。

If you are unable to reproduce the error after the default theme was activated, then this means that your theme was causing ‘Are you sure you want to do this?’ error.

如果您在激活默认主题后无法重现该错误,则表明您的主题正在引起“您确定要执行此操作吗?”。 错误。

找不到错误的根源 (Unable to Find The Source of The Error)

Make sure that you have tested thoroughly to reproduce this error after deactivating and reactivating your plugins and themes.

在停用并重新激活插件和主题之后,请确保已进行彻底测试以重现此错误。

If you find out that no plugin or theme on your site is causing the error, then there are a few extra steps you can take.

如果您发现网站上没有插件或主题引起该错误,则可以采取一些额外的步骤。

These steps will basically replace all core WordPress files with fresh copies downloaded from the source.

这些步骤将基本上用从源下载的新副本替换所有核心WordPress文件。

First, you need to make a complete WordPress backup for your site. This step is important as it will help you easily restore your website in case something goes wrong.

首先,您需要为您的站点进行完整的WordPress备份 。 此步骤很重要,因为它可以帮助您轻松地恢复网站,以防出现问题。

Next, connect to your website using an FTP client and download the ‘wp-config.php’ file to your computer. This file contains your WordPress database settings which you will need later.

接下来,使用FTP客户端连接到您的网站,并将“ wp-config.php”文件下载到您的计算机。 此文件包含您的WordPress数据库设置,稍后需要使用。

Download wp-config.php file to your computer

After that you need to carefully delete all WordPress files from your server except wp-content folder and all its contents.

之后,您需要仔细删除服务器上wp-content文件夹及其所有内容以外的所有WordPress文件。

Delete all WordPress files except wp-content folder

After that, you need to download a fresh copy of WordPress to your computer. You can download it from WordPress.org website as a zip file.

之后,您需要将WordPress的新副本下载到计算机上。 您可以从WordPress.org网站将其下载为zip文件。

Go ahead and extract the zip file on your computer and upload the files inside the ‘wordpress’ folder to your web server using FTP.

继续并解压缩计算机上的zip文件,然后使用FTP将“ wordpress”文件夹中的文件上传到Web服务器。

Once you have uploaded all the files, rename the wp-config-sample.php file to wp-config.php.

上传所有文件后,将wp-config-sample.php文件重命名为wp-config.php。

Now, you need to edit the new wp-config file to enter your WordPress database and table information. You can look at the old wp-config.php file that you downloaded earlier to enter all the information.

现在,您需要编辑新的wp-config文件以输入WordPress数据库和表信息。 您可以查看先前下载的旧wp-config.php文件,以输入所有信息。

See our article on how to edit the wp-config.php file in WordPress for detailed instructions.

有关详细说明,请参阅我们有关如何在WordPress中编辑wp-config.php文件的文章。

You need to add all sections except ‘Authentication Unique Keys and Salts’. Delete all the lines starting with define in this section.

您需要添加除“身份验证唯一密钥和盐”之外的所有部分。 删除本节中以define开头的所有行。


/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         '`+7nTNb<AwtbLA$L-Q7amn;~|wH)ljXv2~TpbP?mLA+M`8H|n1`/Lz-GmAQL{4fB');
define('SECURE_AUTH_KEY',  '/gkAjhhJe`iwO)V-p=J<cN_ +6D{YhrM|=E#C7gD}]c2w~OJ} y}eY^,HWn&-j:a');
define('LOGGED_IN_KEY',    'PtDl2V|01oIXDpq^K,IH-8|rhT +T(ZMpuLq>UD?|W)b3gMfG~g[zr8N6}m%MZ|L');
define('NONCE_KEY',        ']Zj5i*hHlsUWKg2|>YF,X+xpd-_`I[nFmA6ZLw~;EW7g0.s5EaZCAJ=j]./5z^X~');
define('AUTH_SALT',        'e*l:hUsddFIxm1E7y-n#<a0|u- #+SsS@-#$vNz}EY4rY~-x|0_6=Q!TR=MMxUL?');
define('SECURE_AUTH_SALT', 'n]^c9nY>_}3,4)J]S sM6-MI3aB#Qk<Re^j#Lu_|x^*BhO.54aZQTtzJeCo5DWAg');
define('LOGGED_IN_SALT',   'Ba3kd1&J$~~`(|uJ0:v;w+DJ3xW}.B#R9J*r|.+V}*sTuK &8db-Mn+[boHW3{[/');
define('NONCE_SALT',       'nBv-U1qfkCZxS|13%hYdHz*s1^){.KSZWm1A^${`r!d5;EqrH:>1Xx`pwt6?**i}');

Now, save and upload your wp-config.php file back to your website.

现在,保存并将wp-config.php文件上传回您的网站。

That’s all, you have successfully refreshed your WordPress installation. You can now go ahead and try to reproduce the error on your website.

就是这样,您已经成功刷新了WordPress安装。 现在,您可以继续尝试在您的网站上重现该错误。

解决WordPress问题的基本技巧 (Basic Tips for Fixing WordPress Issues)

We understand that fixing such issues can be frustrating at times. That’s why we have prepared a handy WordPress troubleshooting guide which shows you how to investigate and fix WordPress problems like a pro.

我们了解解决此类问题有时会令人沮丧。 这就是为什么我们准备了一个方便的WordPress故障排除指南 ,该指南向您展示了如何像专家一样调查和修复WordPress问题。

WordPress is used by millions of people. No matter what problem you come across, it is likely that thousands of other other people have faced it before you and have fixed it.

WordPress已被数百万人使用。 无论您遇到什么问题,很可能有成千上万的其他人在您遇到并修复它之前遇到了它。

You can find a solution by simply entering the error in the Google search. For more helpful results, add wpbeginner.com at the end of your search term to find an easy step by step guide to fix it.

您只需在Google搜索中输入错误即可找到解决方案。 要获得更有用的结果,请在搜索词的末尾添加wpbeginner.com,以查找简单的逐步指南进行修复。

You can also bookmark our complete guide to common WordPress errors and how to fix them.

您也可以将我们的完整指南收藏在WordPress常见错误以及如何修复它们上。

We hope this article helped you fix “Are You Sure You Want to Do This” Error in WordPress. You may also want to see our complete WordPress security guide to protect your website against hacking and malware.

我们希望本文能帮助您解决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-fix-are-you-sure-you-want-to-do-this-error-in-wordpress/

wordpress修复插件

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值