So you’ve encountered the notorious “Are you sure you want to do this” error in WordPress and need a solution rapidly. First, take a deep breath. Errors like this one have happened to all of us. In fact, it is almost guaranteed that you’ll get the white screen of death error or the “this site is experiencing technical difficulties” error at least once. To solve this, you need a calm approach and a clear mind. That’s because we don’t know what exactly caused it. We can only give you an educated guess on how to find the root problem yourself and restore your website to working order.
What is the most common cause?
Many WordPress users report that nonce keys verification was the culprit. These keys are generated for your website to verify that, for example, a script is run by you, and not an external source. This prevents intruders from altering or abusing your forms, URLs, AJAX calls, etc. Unfortunately, a new plugin, theme, or a corrupted function might interrupt its functionality and cause this issue.
To fix the “Are you sure you want to do this” error in the WordPress Admin Section
In most cases, you’ll have no trouble logging in to your admin panel. Use that to your advantage. If you have a very recent backup, restore it. If you don’t, it’s too late. However, you can still install a backup plugin for WordPress to ensure this doesn’t happen in the future. Let’s try to fix the issue another way.
- Access your Admin Section.
- You might see a notification One or more plugins failed to load properly in the Dashboard. If a theme was the problem, instead of plugins, it will say themes.
- Click on Go to the Plugins (or Themes) screen.
- A theme or plugin will be highlighted on the list. Check the Description tab for a detailed error log.
- If the problem seems to be on one or two lines in code, you can choose to fix it yourself via FTP, by reading the instructions below.
- Our recommendation is to click on Deactivate and deal with it after your website is restored.
- Refresh the homepage and see if it is fixed.
What if I didn’t get a notification or the problem persists?
- Go back to the Plugins screen again. Try disabling plugins one by one, in order of installation from newest to oldest.
- If you recently changed the theme, we recommend deleting the WordPress theme via FTP. Read the steps below.
Steps to fix the “Are you sure you want to do this” error in the WordPress via FTP
You have two choices. Both are equally good and fulfill the same purpose. You can:
- Download and install an FTP client.
Log in with the details provided by your hosting at the time of purchase. This includes a username, hostname, and password. Unless they specified, leave port, and protocol values at default in the client. - Log in to the cPanel on your hosting website.
When you do, look for a web app named Files, FTP, or File Manager.
Fixing the problem if the plugin caused it
- After you log in to FTP, look for the folder named root or public_html.
- Locate a folder named wp-content.
- Navigate to the folder named plugins.
- First, try to disable the plugin you installed most recently. Find a folder with the name of the plugin.
- Download the folder for backup purposes, then either rename it to something at random or delete the folder completely.
- Refresh your website’s home page to see if the error is still present.
- If it is, go back to the plugins folder, and rename it to, for example, plugins-old. All of your plugins will be disabled.
- If the issue is resolved, you know that one of the plugins was the culprit. Slowly enable them one by one in the Admin Section until you find the culprit.
Fixing the issue if a theme was the problem
If the steps above didn’t affect the website positively, it’s time to suspect your theme is to blame.
- Follow steps #1 and #2 above.
- This time, open the folder named themes.
- Locate the folder with the name of the theme you are currently using.
- Download the folder to your computer as a backup.
- You can rename the theme to, by adding old, for example, or delete the folder altogether.
- Your WordPress website should be reverted to its default theme, most likely Twenty Nineteen or Twenty Eighteen.
If this didn’t happen, you most likely deleted the default themes. Don’t worry, you can easily install a WordPress theme via the Admin Section or FTP. - If this worked, there was a conflict of some sort. The easiest way would be to move on and pick a different theme. If your heart is set on the problematic one, you’ll need to hire someone or enable WordPress Debug Mode and try to fix all the errors in the debug log yourself.
Solve “Are you sure you want to do this” error by resetting Authentication Keys and Salts
If neither a plugin nor a theme made any difference, there’s a strong possibility that editing the base configuration file for WordPress might fix the issue. Warn the other admins they would need to log back in after the changes are applied.
- Log in to your WordPress root via FTP.
- In the root folder, find a file named wp-config.php.
- Open the file.
- Scroll down a bit or search for “Authentication Unique Keys and Salts.”
- Locate eight lines of code that start with define(‘
- Visit this link to generate complex but random security phrases.
You can refresh the tab if you want to re-generate phrases. - Highlight all the 8 lines of code in the provided link.
- Copy and paste them to replace the existing 8 lines of code in wp-config.php.
Make sure not to change the format or placement in the file. For example, there’s an empty row underneath the last define(‘ line. - Save the changes, refresh the website.
- The website should be back online now.
Nothing worked. What do I do?
This means the issue is complex and would require someone knowledgeable to take a look. We guess it could be the common but problematic WordPress memory exhausted error. This will require you to increase the PHP memory limit. If you are good at following steps, read our guide. But, to be honest, your best bet is contacting your hosting’s Customer Service before you make the problem even worse.