How to Fix the “Are You Sure You Want to Do This” Error in WordPress (4 Methods)

How to Fix the “Are You Sure You Want to Do This” Error in WordPress (4 Methods) thumbnail

Do you keep getting the “Are you sure you want to do this” error message while working on your WordPress site? You’re probably wondering what’s causing it and if there’s a way to get rid of it. This warning can be very frustrating, as it doesn’t really tell you what the problem is. Plus, it prevents you from performing basic tasks on your site, such as editing blog posts.

The “Are you sure you want to do this” error can happen for several reasons. You may have installed a faulty plugin or theme, or you might be experiencing a security issue. Fortunately, you can determine the exact cause and fix the error in a few simple steps.

In this post, we’ll look at the main causes of the “Are you sure you want to do this” error in WordPress and show you how to fix it using four methods. Let’s get started!

What the “Are You Sure You Want to Do This” Error Is

The “Are you sure you want to do this” issue usually crops up while you’re performing certain tasks on your WordPress site. For instance, you may be trying to publish a post or customize your theme when the error message appears, preventing you from completing the job.

The “Are you sure you want to do this?” error in WordPress.

WordPress uses security tokens, called nonces, to verify that you have the proper permissions to perform a particular action on the site. These nonces help protect your site against hacking attacks. Therefore, when the “Are you sure you want to do this” error message pops up on your screen, it means that WordPress was unable to recognize you as the rightful owner or user of your site.

Various factors can trigger this verification failure. Next, we’ll take a look at the leading causes.

Skip the Stress, Outsource to Us

Avoid troubleshooting when you sign up for DreamPress. Our friendly WordPress experts are available 24/7 to help solve website problems — big or small.

Potential Causes of the “Are You Sure You Want to Do This” Error

The “Are you sure you want to do this” error message doesn’t pinpoint exactly what the problem is. However, we can narrow down the issue to a few causes.

Below are four common reasons you may be seeing this error:

  1. You’ve selected an incorrect file when uploading a plugin or theme.
  2. You’re using a plugin or theme with incorrect code.
  3. You need to increase your PHP memory limit.
  4. You’re facing a security issue due to corrupted files.

The most likely scenario is a faulty theme or plugin on your site. To figure out what is causing the issue, however, you’ll need to do some troubleshooting.

How to Fix the “Are You Sure You Want to Do This” Error in WordPress (4 Methods)

Now, let’s go through the four main methods for fixing this common WordPress error. Before proceeding, you may want to perform a backup of your site just in case something goes wrong and you need to restore an earlier version.

1. Check Your Plugins

As we mentioned earlier, the “Are you sure you want to do this” error could be caused by a faulty plugin on your site. To find out if this is the case, you can deactivate your plugins and reactivate them one by one.

Note that for this step, you’ll need to access your site’s root directory using a Secure File Transfer Protocol (SFTP) client such as FileZilla or by logging in to your web hosting account and using the file manager.

If you have a DreamHost account, you can navigate to WordPress > Managed WordPress in the sidebar, find your domain, and select Manage.

The DreamPress Manage screen.

On the next page, click on the Manage Files button in the Details section. In the file manager, open the folder with your domain name.

In your site’s root directory, locate and open the wp-content folder. To deactivate your plugins, you can find the plugins folder and rename it to “plugins_test”.

Renaming the plugins folder in the site’s root directory.

Return to your WordPress site. If the error message doesn’t reappear, you know that a plugin caused the issue.

The next step is to find out which one is the culprit. First, navigate back to your site’s root directory and rename the plugins_test folder back to “plugins”.

Next, go to the Plugins page in your WordPress dashboard. Activate the first plugin, and then check to see if the error is still present. Continue activating them one by one and testing your site until you find the plugin causing the error. Then you can replace it, or reach out to its developer for help.

2. Switch to a Default WordPress Theme

If deactivating your plugins doesn’t resolve the issue, it’s time to see if your current theme may be to blame. We’ll do this by switching to the default WordPress theme.

Once again, you’ll need to access your site’s root directory. To switch to the default WordPress theme, you can open the wp-content folder, locate the themes folder, and then rename it to “themes_test”.

Renaming the themes folder in the site’s root directory.

After renaming the folder, your site will automatically revert to the default WordPress theme. To see if this solves the problem, return to your site and carry out the same tasks that caused it before.

If the “Are you sure you want to do this” message doesn’t come up, your previous theme must have been at fault. As with your plugins, this means you may need to update or replace your theme (or get in touch with its developer for assistance).

3. Increase Your PHP Memory Limit

If disabling your plugins and switching themes didn’t do the trick, the issue might be your WordPress PHP memory limit. If your current limit is set too low, it can interrupt certain processes.

There are various ways to go about this. If you’re a DreamHost user, you can increase your PHP memory limit by editing your phrc file. For other WordPress users, you can go through your php.ini or wp-config.php file.

By default, the limit is set to 256M. However, you can add a line of code to the file to increase the limit. For example:

memory_limit = 300M

You can choose whatever value you wish. Save the file, and then reload the WordPress page displaying the error to see if this has resolved the problem.

4. Replace All Your Core WordPress Files With Fresh Copies

If the above three methods didn’t fix the error, it’s possible that some of your WordPress files became corrupted due to a recent malware or hacking attack. To confirm this, you can replace all of the WordPress core files with fresh copies.

Again, we recommend that you perform a backup of your site first. When you’re done, you’ll need to access your site via an FTP client. While you can also use the file manager in your web hosting account for this method, it will be quicker to replace your site’s files using an FTP client.

In the root directory, locate and download the wp-config.php file.

Downloading the wp-config.php file from the root directory with the FTP client.

Next, you can delete all WordPress files and folders in the root directory except for the wp-content folder, which contains your plugins, themes, and media. Then download the latest version of WordPress to your computer and extract the .zip file.

Locate and copy the wp-config.php file you downloaded, and paste it in the extracted WordPress file.

Adding the downloaded wp-config.php file in the WordPress folder.

The final step is to upload the WordPress files on your computer to your site. These new files will replace the ones that we deleted in the root directory.

If you’re using FileZilla, select every item in the WordPress file on your computer except the wp-content folder, and then right-click and select Upload.

Uploading new WordPress files to your site’s root directory.

The uploading process may take a few minutes. Once it is complete, you can return to your WordPress site, and the error message should be gone.

Additional Troubleshooting Tutorials

Do you want to learn how to resolve other website issues? We’ve put together several tutorials to help you troubleshoot some of the most common WordPress errors:

Meanwhile, if you want more information about setting up and running a WordPress site, check out our WordPress Tutorials. There, you’ll find a collection of guides designed to help you navigate the WordPress dashboard like an expert.

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

Banish This WordPress Error Message

The “Are you sure you want to do this” error may prevent you from performing basic WordPress tasks. While a faulty theme or plugin commonly causes it, it can also arise if you’ve reached your PHP memory limit or your site’s facing a security issue.

To resolve the “Are you sure you want to do this” error, you can try these four solutions:

  1. Deactivate your plugins and reactivate them one at a time.
  2. Revert to the default WordPress theme.
  3. Increase your PHP memory limit.
  4. Replace all WordPress core files with fresh copies.

Troubleshooting WordPress issues can be time-consuming. If you want to spend less time dealing with WordPress errors, you might want to consider switching to DreamPress. Our managed WordPress hosting plans come with full technical support for site owners, as well as daily backups to help keep your content safe.

Photo of Natasha Köstlin
About the Author:

After joining the DreamHost team in 2018, Natasha discovered her talent for helping people achieve website success. Her superpower: a warm, energetic attitude! As a key player in DreamHost’s international marketing efforts, Natasha is excited to help readers across the world build and grow an online presence.