How to Fix – Are You Sure You Want to Do This – Error in WordPress

If you have your own WordPress website, then chances are that every now and then you are bound to come across errors such as database connection error or a white screen of death.

These errors are solvable, since the reason for the same would clearly be listed by WordPress. It can tell you exactly what the problem is but errors such as this one, are harder still to resolve since they can take place on account of various factors.

You may get a ‘are you sure you want to do this” error every now and then and since the error can occur due to several factors, you may not get a reason as to why the error crept in the first place.

You will need to investigate the issue and find out the casuvative factors and resolve the issue at the earliest. You may want to read up on the rest of the article and review the step by step directions posted below.

When does this error occur?

Usually, this error comes up when WordPress safety protocol fails in the form of nonce; nonce is a set of random numbers that are generated by WordPress, by plugins, theme and are often generated to protect your website from abuse.

When this happens, the error “are you sure you want to do this?” is usually generated especially when the nonce verification fails. Review the steps listed below to resolve the same at the earliest.

1. Plugins:

Plugins and especially external plugins are the main culprit when this happens; so you need to deactivate the lot or at the least, deactivate the rogue plugin.

Fix Are You Sure You Want to Do This Error in WordPress

You are not going to delete it altogether but just deactivating it as this can prevent the plugin from interfering with your website.

So the first thing that you need to do is to access the root directory of your website, using the FTP client that your host has provided you with.

Now, change the name of your plugin folder and see if that resolves the issue. If it does, then you need to locate the rogue plugin which is easier said than done.

Just head over to the plugin folder after you activate it again and change the name of each plugin one by one; you should be able to locate the rogue plugin and get it sorted out so as to resolve the error asap.

The process may seem overwhelming but it truly is the only way to find out which plugin is causing the error in the first place.

2. Themes:

If the issue is not resolved, then you need to investigate your theme; it should be pointed out that a few themes may have compatibility issues and may generate this error.

But before you take the next step, head over to your FTP client, download your theme file to your system and back it up. Now, delete the theme that you are using from your WordPress server and you should get a notification to the same effect.

This should result in WordPress pointing out the fact that your current theme is no longer available, and that a default theme will be used.

Now, check and see if the same error crops up again; if it does not, that means that the theme was responsible for the error being generated in the first place.

3. Unable to find the source of the error:

By now, you should have resolved the error in question but if the steps listed have not resulted in any meaningful results, then perhaps it is time for you to look at other options.

The first thing that you need to do is to make sure that you have a complete backup of all your essential core files; your web host provider should provide you with automatic full backup but either way, back up all your core essential files.

Now, that you have backed up all the core essential files, all that’s left for you to do is to access your website’s root directory and delete all the files except for wp-content directory as it contains all the information that you have loaded on to your website.

Now, download a fresh copy of WordPress file from WordPress.org, extract the required files, and upload the same to the directory in the root.

This ensures that all the files except for wp-content are uploaded; now you can create a new wp-config file in the root, and open up the old wp-config file in your system.

Delete all the lines starting with “define” in this section, and using the FTP client, save the same to your new wp-config file.

That should do the trick and now, check and see if the error issue repeats itself in the main website, and reload the website. This should help resolve the error, once and for all.
/**#@+
* 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=JUD?|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#_}3,4)J]S sM6-MI3aB#Qk1Xx`pwt6?**i}’);

This error occurs due to various reasons and listing just one or two reasons above all else seems a tad asinine; but the fact is that since the error occurs due to several factors such as theme, plugin or something as simple as an image edit, it can be a tad hard to hone in on some of the causative factors.

But this error is not as hard as it seems as long as you follow the steps listed above. You need to get it resolved asap and it is equally important that you remember to do a complete backup.

This is required as you would be tinkering with some of the core files. But the good news is that WordPress comes packed with all the advanced functionality and tools that you would need, to help resolve this error.

About Sonl Sinha

Sonl SinhaSonl Sinha is a passionate writer as well as WordPress and WooCommerce rockstar who loves to share insights on various topics through his engaging blog posts. He runs a successful website design and digital marketing company. With 15+ years of experience in WordPress theme development, he strives to inform and inspire readers with his thought-provoking content. He helps thousands of small and medium businesses and startups create a unique online presence. Follow Sonl Sinha for your regular dose of knowledge and inspiration.

Do check out our free WP themes and WordPress themes bundle