WordPress errors are always set to ruin your day! They normally happen when you least expect them and don’t have the time to sort. Some errors such as ‘Error establishing a database connection’ whilst annoying at least tell you what the issue is. On the flip side, you might sometimes see an error that says ‘Are you sure you want to do this’?
This error message is super frustrating as it doesn’t pinpoint what the problem actually is! This is as a result of there being too many potential issues that could cause the problem so WordPress is unable to provide anything more specific. Fortunately there are a few quick steps you can take if you find yourself faced with such an error message. Carry on reading to find out more.
What’s the Cause of This Message?
Before we can fix the problem we need to try and understand what the cause was. Although the error message doesn’t help us identify which specific element of our site is the reason for the error, we do fortunately know why it’s happened.
In most cases, the error message has been generated as a result of WordPress being unable to read the nonce verification code of a WordPress theme or plugin. Nonces are security keys that are generated by WordPress to help protect against certain form of hacking attacks. If you’re interested in finding out more about these you can check out our article on them ‘Nonces in WordPress – All You Need to Know’.
So, whilst we don’t 100% know what the root cause is, we can normally narrow our search down to our theme or plugins which makes life easier.
How Do I Fix the Problem?
Because the cause of the error message is likely to be a theme or plugin, we need to systematically disable these in order to see if this resolves the issue.
Host your website with Pressidium
60-DAY MONEY BACK GUARANTEE
Before starting, have a think about whether or not you recently updated one or more plugins on your site, or updated your theme. If you noticed the issue immediately after these updates then you can save yourself some time by just troubleshooting your recently updated theme/plugin.
Fix 1: Use a Backup
Often the quickest way to resolve issues like this is to ‘go back in time’. If you’re a Pressidium customer or a regular reader of our blogs you’ll know we strongly recommend you take regular backups of your site (and provide automated backups for all our customers). In an ideal world you would also have taken a snapshot backup prior to undertaking any updates. Either way, if you have a backup and it’s easy to deploy then this could be a excellent first step to take. Go back just a few hours (or prior to any updates to themes/plugins) and see if this resolves the issue. If it does and you (for example) only updated one specific plugin then you now know what the culprit for the error message was.
Fix 2: Deactivate Plugins
If you don’t have a backup that’s easy to deploy or don’t want to restore your site for fear of losing a large chunk of work then don’t worry. There are other options. The next logical step in resolving the ‘Are Your Sure You Want to Do This?’ error is to disable your plugins.
If you have access to your WordPress admin area you can do this from there. Simply log in, head to Plugins and click on the ‘Disable’ link below each. Now refresh your site and see if the error message still appears. If not, you’ve narrowed the fault down to a plugin. You’ll now need to re-enable each plugin and refresh your site each time to see if you can trigger the warning. In doing so you’ll be able to identify which of the plugins was causing the issue.
If you’ve been locked out of WP-Admin we will need to do this via SFTP.
To do this connect to your WordPress hosting via your favourite SFTP client (we like WinSCP) and head to the
wp-content folder followed by the folder called ‘plugins’. Open the plugins folder and then right click on one of the plugin folders and hit ‘rename’. Add the word ‘disabled’ after the plugin name as shown below.
Now, head back to your site and refresh it. Can you now access it and is the error resolved? If so, you’ve identified the problematic plugin. If not, keep disabling the plugins until you resolve the issue.
If you disable all your plugins and still can’t access your site or are still seeing the error message then fear not. Take a look at the next option available to you below.
Fix 3. Deactivate your Theme
If you can access your WordPress Admin then this is easy. Head to Appearances > Themes and you’ll see at least one theme in the Dashboard (your current theme). You will probably have one or two others there as well (default WordPress themes). If not, click on ‘Add New’ and select any theme from the window that pops up.
Now, hover over one of the currently inactive themes (i.e. any theme other than your current active theme). Click on the ‘Activate’ button and this new theme will turn on whilst at the same time de-activating your old theme.
Refresh the front end of your website… has the issue resolved itself and the ‘Are You Sure You Want to Do This’ error disappeared? (Don’t forget that as your main theme has been deactivated your website may look a little weird!).
If you can’t access your theme through your WordPress Admin you’ll need to access and disable it via SFTP. The method is very similar to how this was done for plugins.
Log into your server using SFTP, find the folder
wp-content, click on the themes folder and then rename your active theme by adding ‘disabled’ after it as shown below.
WordPress will then default to one of the other available themes allowing you to refresh your website and see if the error message has disappeared. If it has, you’ll need to log into your WordPress Admin and delete or update your theme.
Any error on your website can be stressful, especially if it’s one that locks you out of your WordPress Admin. No matter how much care you take with your website, it’s always possible to have unexpected glitches which is why backing up your site is so important.
Start Your 14 Day Free Trial
Try our award winning WordPress Hosting!