×


"Are you sure you want to do this" error in WordPress - Fix it Now ?

WordPress error, Are you sure you want to do this happens as a result of a Nonce check failure.
Nonces are verification codes for plugins and themes.

If WordPress cannot correctly read the Nonce of a plugin or theme this error will appear.
Unfortunately, this error message does not tell you which theme or plugin are the issue. It is likely the plugin or theme that you recently installed or updated.
This WordPress error is mostly evident in the Admin area.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related WordPress error.

How to resolve 'Are you sure you want to do this' error in WordPress ?

Nonces are unique keys that add a security layer to protect WordPress URLs, forms, and ajax calls from abuse.
These keys are appended to URLs when performing an admin action in WordPress. Furthermore, they ensure that a script is originating from our website and not an external source like a hacker trying to gain access to our website.
However, at times a plugin or theme may use it incorrectly which may end up with this error.

Steps to fix this WordPress error ?

This error is mostly caused by a plugin or theme that is installed on our site.

1. Investigating Plugins
First, we deactivate all WordPress plugins and ensure that WordPress is unable to locate any installed plugin.
i. For deactivating the plugins, we connect to the WordPress account using an FTP client.
ii. Once connected, we will rename the plugins folder inside the folder wp-content to plugins.deactivated.
iii. After that, we will get a notification for all deactivated plugins in the plugins page in the WordPress admin area.
Once this is done we can check if the error persists.
If the error does not appear again, it means that one of the plugins on our website was causing the issue.
To figure out which plugin was causing the issue, we can rename plugins.deactivated folder back to plugins.
After that, activate each plugin one by one on the plugins page in the WordPress admin area.
If we cannot find the error after activating each plugin until we find the plugin that is causing the issue.

2. Investigating Themes
If the plugins were not causing this issue, then it might be the themes that are causing the 'Are you sure you want to do this' error. We can do the same procedure that we did to check for plugins here also.
i. First,  we need to connect to the website via FTP and download the currently active theme. And save it as a backup.
ii. Once we have backed up the theme, we can safely delete it from our web server.
We may get a notification: 'The active theme is broken. Reverting to the default theme'.
And WordPress will be using the default theme like Twenty Seventeen for our website.
If we cannot find the error after the default theme was activated, then this means that the theme was causing 'Are you sure you want to do this?' error.

Steps to follow if we are still unable to find the Source of the Error:

These steps will basically replace all core WordPress files with fresh copies downloaded from the source.
1. First, take a complete WordPress backup for our site. It will help us easily restore our website in case something goes wrong.
2. Next, we can connect to our website using an FTP client and download the 'wp-config.php' file to our computer.
3. After that, we will delete all WordPress files from the server except the wp-content folder and all its contents.
4. Once we complete the above step, we can download a fresh copy of WordPress to our computer. We can download it from the WordPress.org website as a zip file. We can extract the zip file on our computer and upload the files inside the 'wordpress' folder to our web server using FTP.
5. After updating all the files, rename the wp-config-sample.php file to wp-config.php.
6. Now, we need to edit the new wp-config file with the new  WordPress database and table information. Now, save and upload the wp-config.php file back to our website.

[Need assistance in fixing WordPress errors? We can help you. ]


Conclusion

This article covers methods to fix 'Are you sure you want to do this' error in WordPress for our customers.

One of the most common solutions is to revert your website to an older backup before the error occurred. If you update your backup regularly, it is one of the most powerful tools to use against errors.
If you do not update regularly, the backup is close to worthless because it is missing your regular content updates and website changes.

To fix "Are You Sure You Want to Do This" Error in WordPress:

1. You will not need any additional plugins to solve this issue and in fact, a plugin is likely causing the issue. The error is very simple to track but can become quite tedious if you have a lot of plugins and themes installed. The process includes disabling your themes and plugins while checking to see if the error is fixed. If you have a lot of plugins, this process may take a while. Deactivating the plugins will not be enough because they can still cause a problem. This is why it is recommended to uninstall a plugin if you are not using it.
2. Log into the cPanel and click on the File Manager. Click on the public-html directory and locate the wp-content folder. This folder contains all of the content on your website. Locate the plugins folder and right-click it.
Select the Rename option and rename it to "plugins off" or something similar.