Fixing The "Are You Sure You Want to Do This" Error in WordPress
parallax background

Fixing The “Are You Sure You Want to Do This” Error in WordPress

Locked Out of WordPress? Here’s How to Fix the Issue
June 30, 2021
WordPress Briefly Unavailable for Scheduled Maintenance (Solved)
July 2, 2021

From time to time WordPress users run into an error message. That can be stressful.

Developers may not be able to apply changes to the content. So sometimes the website becomes inaccessible to visitors.

It's crucial to fix the problem without delay. Keeping an updated backup of the site is always important and it comes in handy when trying to restore the page.

Some error messages explain what is their root cause. But that’s not the case with the “are you sure you want to do this” error.

Troubleshooting can be time-consuming, especially when you don’t know where to start.

Often it’s a new plugin or theme that triggers the issue. But there could be other actions causing the error.

This article explains what the “are you sure you want to do this” error means, the possible causes, and how to fix it.

What Is The "Are You Sure You Want to Do This" Error


Finding solutions requires identifying and removing the source of the problem. So it's important to understand the issue.

The "are you sure you want to do this" error means that WordPress cannot correctly read the nonce verification code of a plugin or theme.

"Nonce" stands for a "number used once". It's a security key that WordPress generates to protect URLs and forms from hack attempts.

It's added to the URL when the webmaster wants to make a change, e.g. to delete a comment. The nonce token then goes through a security check.

A failure to pass the check triggers the "are you sure you want to do this" error.

Unfortunately, the message doesn't say exactly what is the root cause. But usually, it's a new theme or plugin that the user has installed.

The way to find out is to switch the site back to the default theme.

Having the latest content backup will prevent any data loss. If the page is running again, the cause of the problem was the deactivated theme.

The "are you sure you want to do this" error could also be triggered by the following actions:

● Media upload to posts and pages

● A new post or page upload

● Theme personalization

● New tags and categories for posts

● WordPress core update

Fixing the “Are You Sure You Want to Do This” Error

As mentioned earlier, the error message doesn't specify where to look for the problem.

So there's no set approach to take to find the root cause. It may be necessary to try a few different methods.

But before starting anything, make sure your WordPress site backup is up to date.

The first thing to do is to scan the site for malware. This security check protects the page from serious harm.

Another important step is to clear the cache and cookies. The older data stored in the cache can be causing a conflict with your recent activity.

How To Disable Plugins


Plugins are a common cause of the “are you sure you want to do this” error. Unfortunately, there's no quick way to find the one that’s faulty.

The only solution is to deactivate all the plugins and keep checking one by one if the error reoccurs. Users can switch off plugins either from the WordPress admin area or the cPanel.

Using the Admin Dashboard To Disable Plugins


On the WordPress admin area go to Plugins - Installed Plugins. This will display a list of all plugins installed on your website.

Only disabling them may not solve the problem. It's necessary to first deactivate them and then uninstall them.

Having deleted a plugin, check if your site is working. Repeat the same action with the other plugins on the list until you find the one causing the error.

Some users have a lot of plugins installed on their site, so this process of checking one by one is tedious. There is an option to rename the plugins folder, delete them in bulk and check if the page is working.

This method may seem quicker. But even if the site starts running again, it’s still necessary to find out which plugin caused the error.

Using the cPanel To Disable Plugins


Users can disable plugins in bulk using the cPanel.

Go to the File Manager, select the "public-html" directory, and the "wp-content" folder. Here users will find a folder called "plugins".

Right-click on it and choose Rename. The new name could be, for example, "plugins.disabled".

WordPress only works with the default folder named "plugins". By changing the name, all plugins are automatically deactivated.

Next, check if the website is working again. If the error has disappeared, then it was a plugin problem.

Now it’s time to identify the broken plugin. Return to the "plugins.disabled" folder and rename it the default name "plugins".

Then reactivate the plugins one by one using the WordPress admin dashboard. Keep reloading the site until you find the faulty one.

Managing a Faulty Theme


Plugins are not the only source of the “are you sure you want to do this” error. The root cause could be the theme.

First, download a backup of the current theme and then disable it. Try to reload your site to see if it's working again.

If the site is running again, the deactivated theme is faulty. To manage the problem, follow these suggestions:

1. Check if there's a theme update available. If so, download it and try to activate it again. See if the error reoccurs.


2. Remove and then reinstall the theme and check if the site works


3. Delete the theme causing the error and choose a more suitable one.

Before applying any theme changes on the live site, try it first on a staging site. This allows you to test modifications without causing any issues to the live website.

Changing PHP Memory Limit And the Maximum Upload Limit


In other cases, the “are you sure you want to do this” error occurs when uploading a file.

The PHP memory limit and the maximum upload limit are set up by default. Trying to upload a file that exceeds those limits triggers the error.

The solution is to change the PHP memory limit and the max post size. Do this by adding code to the ".htaccess" file found in your WordPress directory root folder.

Connect to your FTP and locate the ".htaccess" file. Right-click on it and choose View/Edit.

Download the file and open it using Notepad. Next, copy this line of code and paste it at the end of the file:

Php_value upload_max_filesize 1000M
Php_value post_max_size 2000M
Php_value memory_limit 3000M
Php_value max_execution_time 180
Php_value max_input_time 180

Finally, save the changes and click on Yes when asked if you want to upload the edited file.

This step should fix the problem with the file upload. Try again and check if the error is gone.

WordPress Core Update


This article has covered the most probable causes of the “are you sure you want to do this” error. But if the message is still appearing, replace your core files and download a fresh copy of WordPress.

This step should definitely resolve the problem. Remember to create a complete WordPress backup for your website before starting.

This will make it possible to revert any changes and restore the page with ease.


To replace the WordPress core files, access your site via FTP. Find the "wp-config.php" file which contains the database settings.

Download the file to your computer. Next, delete all files from your server except the "wp-content" folder and all its contents.


Now go to and download a zip file of the latest WordPress version. Once it's downloaded, unzip the files and save them.

On the left side of the screen is the folder that contains the fresh WordPress files.

Open it and select all the files except "wp-content" and the "wp-config.php" file. Right-click on the selected files and upload them.

Updating the WordPress core files usually resolves the issue. Check if the website is working now.

Ending thoughts on fixing the "are you sure you Want to do this" error in WordPress

Error messages are not uncommon. They can cause trouble for developers and visitors alike.

This article provided the answer to why the “are you sure you want to do this” error occurs, and tips on how to fix it.

If there's an issue with the nonce security keys, in most cases it's caused by a plugin or the active theme. Sometimes it's due to the PHP memory limit and the max post size.

The solution isn't straightforward and you have to search for the source of the error. Check the plugins and the theme.

Change the PHP memory limit and the maximum upload limit. If this doesn't help, update your WordPress core files, carefully following the instructions in this article.

If you enjoyed reading this article on are you sure you want to do this error, you should check out this one about WordPress add media button not working error.

We also wrote about a few related subjects like failed to open stream error, WordPress post missed schedule, failed to load resource error, WordPress posting to Facebook done automatically, Wordpress mixed content errors, how to reorder pages in WordPress and WordPress updating failed error.

Albert Ślusarczyk
Albert Ślusarczyk
As the co-creator of Be Theme, I am a strong believer in designing with care and patience. I pour my energy, time & knowledge into perfecting the theme for our 230,000+ customers.