When it comes to WordPress, there are a few error messages which are self-explanatory, while some error messages really confuse the user. For example, sometimes users are greeted with this error “Are you sure you want to do this?” which doesn’t exactly explain what the problem is, and to be honest, this is a very vague message. Now, there are many factors that can lead to this error. Therefore in this article, we will be looking at some possible solutions to fix this error “Are you sure you want to do this?” in WordPress.

fix wordpress error

Why and when does this error occur?

This error message appears when WordPress checks for nonce and it fails. These nonce are unique keys which are generated by a theme, plugin for a core WordPress file for verification. It is very much essential that this nonce check passes, or else you will get this error.

The above answer was a bit technical, but in simple terms, you can get this error 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 time outs.

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 are some solutions to fix “Are you sure you want to do this?” error in WordPress.

Checking plugins

Deactivating a plugin can still cause the problem, that’s why if you want to know whether a plugin is the culprit or not, then you need to delete the plugins. If you don’t want to delete the plugin, then just use a FTP client, or File Manager in your cPanel and then rename wp-content/Plugins directory to something like Plugins.deactivate.

Once you do this, WordPress will deactivate all the plugins and you will also be able to see the message informing about the same in your WordPress admin area.

Now that all the plugins are truly deactivated, it is now time to try and reproduce the error. If the error does not appear again, then it means that a plugin is responsible for the error and you will need to find that plugin. To know which plugin is creating the problem, rename that Plugins.deactivate directory back to Plugins. Next, login to WordPress admin and activate plugins one by one until you find the one plugin that’s creating the problem.

Checking the theme

If in above step the plugin is not the culprit in your case, then the theme can be causing the problem. First, download your existing theme to your computer as a backup, and then delete the entire theme from your website. You will now be able to see a message that says “Reverting back to the default theme.” Don’t worry, this message is normal.

Now try to reproduce the error. If you are not getting the error anymore then the theme was the culprit. Also note that the theme’s folder should not have any spaces in it. For example, it should not be named as “My Theme” but it can be named as “MyTheme.”

Editing your php.ini file

If all else fails, then this is what you 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.

Also check out our WordPress problems and fixes section to fix all your everyday WordPress related problems.

Leave a Reply

Your email address will not be published. Required fields are marked *