WordPress is an open-source content management system. It is the easiest and most powerful blogging CMS in existence today.
How to solve “Are You Sure You Want to Do This” Error:
It is easier to find the problem when you know where to search, right? Some errors give you insights, but Are you sure you want to do this? WordPress error is not one of those. Most commonly, this error is caused by a plugin or a theme that is installed on your website. In order to find out the exact reason, some actions like disabling plugins or themes should be taken. In this tutorial, you will learn how to inspect and fix Are you sure you want to do this? WordPress error.
Why and when does this error occur?
This error message appears when WordPress checks for the nonce and it fails. The nonce is the unique keys generated by a theme, plugin for a core WordPress file and it is for verification. It is very much essential to pass this nonce check, or else you will get this error.
In simple terms, this error appears when you are uploading a new theme, trying to install a new plugin or perhaps making any change in theme or plugin. You can also get this error when saving a post, as sometimes WordPress timeouts.
When you get this error, you will also get a “Please try again” link with it, but on trying it again, you might still face the same problem. So here some solutions to fix “Are you sure you want to do this?” error in WordPress.
If need to verify whether a plugin causes the problem, we can check by deactivating the plugin. But deactivating a plugin still causes some issue if a plugin was completely removed from the WordPress. If you don’t want to remove a plugin completely, it can be just renamed by using an FTP client or File Manager in cPanel interface. In the File Manager section, rename the wp-content/Plugins directory for renaming the plugins and check it. Renaming the plugins is similar to the deactivation of the plugin.
Once it is done, WordPress will deactivate all the plugins. In the WordPress admin area, we can check now about the message informing the error.
If all the plugins are truly deactivated, it is now time to try again and reproduce the error to find the particular plugin responsible for the error. To know which plugin is creating the problem, rename that Plugins again. Next, login to WordPress admin and activate the plugins one by one to find which plugin is causing the error.
In the above step, we suspect that the plugin may be the cause of the issue but if it is not causing the problem, then we have to check the theme. Initially, download your existing theme to your computer as a backup, and then delete the entire theme from your website. Now, a message appears as “Reverting back to the default theme.” Don’t worry, as this message is normal.
Now try to reproduce the error again. If the error does not appear anymore, then this issue is due to an error in it. And also, ensure that the folder name for the theme should not have any spaces in it. For example, the folder name should not be as ‘My Theme’, instead, it should be named as ‘MyTheme’.
Edit your php.ini file:
If all the above steps fail, then this is what we should try. To edit this php.ini file, you need to first locate it on your website. This is not a WordPress specific file, and that’s why it can be in any location, and that’s why it is better to ask your web host about the location of this file.
Once you find the location, edit this file and change the settings to these:
max_execution_time = 300
Once you do this, you might want to restart your Apache; and if you are on a shared hosting, then you will need to contact your web host to do that.
Hope these solutions would fix your “Are you sure you want to do this?” error in WordPress. Do try out these easy fixes.