How to Fix “Are You Sure You Want to Do This?” Error in WordPress site

Are you unable to proceed with tasks on your WordPress site because you get the prompt “Are you sure you want to do this?”

Seeing this error can make you second guess your actions because you might have just broken your WordPress website.

So what does this warning mean? Unfortunately, there isn’t a simple answer as there are a number of reasons why you might be seeing this error.

It could mean a plugin is malfunctioning, or worse, your website has been hacked! If a hacker has broken into your site, they can damage it by stealing data, displaying spam content, and defrauding your customers.

But don’t worry because, in this article, we’ll uncover what this warning means, why it happens, and how to fix it.

TL;DR:

The error Are You Sure You Want to Do This? can mean your website is hacked. To check this, scan your site immediately with the MalCare Security Plugin. The plugin will detect the infection and enable you to clean up your website. This will resolve the error and you can carry on with your task.

What Is The “Are You Sure You Want To Do This?” Error?

When you see the error Are you sure you want to do this?, you will also see a link that says ‘Please try again’.

Are you sure you want to do this error on WordPress

But even if you click on this link a thousand times, you’ll still see the same prompt until you resolve the problem.

Now, this can be quite frustrating at first as it leaves you stuck wondering what the problem is. Plus, the error message is a very vague prompt and doesn’t specify what the problem is.

To understand what this error means, let’s first take a look at the different instances in which this error is displayed. WordPress usually displays this error when you’re trying to carry out administrative tasks like:

    • Updating your WordPress site (core, themes & plugins)
    • Installing or uploading a new theme
    • Customizing the theme
    • Drafting and publishing pages and posts
    • Inserting media files into a post or page
    • Creating tags or categories

This list isn’t exhaustive but is indicative that this error appears with any kind of administrator tasks.

These actions usually require WordPress to check if you have permission to carry out the specific action. If WordPress is unable to verify that you have access to do this, it displays errors like “Are you sure you want to do this?”

What Are The Causes Of “Are You Sure You Want To Do This” Error?

Unfortunately, this error can appear for many reasons and you need to put in a bit of effort to find out why it’s occurring on your WordPress website. Here are the most common reasons you’ll see the error Are you sure you want to do this?:

    • While trying to upload a theme or plugin, you’re choosing a file that is in an incorrect format.
    • You are trying to use an improperly coded theme or plugin that is disrupting the functioning of your site.
    • You’ve reached your PHP memory limit.
    • Your website has been hacked or infected with malware.

To pinpoint the cause, you need to take steps to troubleshoot the problem. Sounds complicated? Don’t worry, we’ve simplified the steps to make it extremely easy for anyone to carry out. This will also make the process faster so you can fix the problem and move ahead with your tasks as soon as possible.

Easy Ways To Fix “Are You Sure You Want To Do This?”

As we mentioned, there are many underlying causes to the error Are you sure you want to do this?. Here are the different measures you can take to fix this error:

    1. Check The Security Of Your WordPress Site
    2. Clear Your Cache
    3. Upload Plugin or Theme File Manually
    4. Check Your WordPress Plugins
    5. Check Your WordPress Theme
    6. Increase Your PHP Memory Limit

We advise you to first check the security of your website by scanning for malware because this is an issue that can cause severe damage to your WordPress site.

Caution: Before you proceed with any of the steps below, we strongly recommend taking a full backup of your WordPress site. This is because troubleshooting sometimes requires you to make changes to your WordPress files. A slight misstep could cause your site to break. Keep a backup copy handy so that you can quickly restore your site in case anything goes wrong. You can get a backup copy with our premium BlogVault Backup Plugin. It’s easy to set up and your backup will be ready in a few minutes.

1. Check The Security Of Your WordPress Site

When hackers break into your website, they usually change your WordPress permissions. They remove your admin access and create rogue admin accounts on your site.

You might be seeing this error because you don’t have permission to perform the task at hand.

To check if your website has been hacked or infected with malware, you need to run a thorough scan of your website. We recommend using our MalCare security plugin.

Step 1:  Install and activate MalCare on your WordPress site. If you are unable to access your wp-admin panel, you can visit the MalCare website and install it on your site from there.

Step 2: Access MalCare on your dashboard, enter your email address and select Secure Site Now.

Check security with Malcare Plugin

Step 3: You will be redirected to MalCare’s dashboard where the plugin will run a deep scan of your website. MalCare is built on advanced technology that can sniff out any kind of malware or hack on WordPress sites. If there is no malware on your site, it will display the following prompt:

Configure Malcare Plugin before working on the error in WordPress

If your site is hacked, it will display the number of files that are infected. You can then promptly clean up your website. MalCare offers an instant malware remover that will clean your site in under a few minutes.

Check if your site is hacked

Step 4: Once your website is clean, if the error Are you sure you want to do that? Persists, you need to implement website hardening measures on your site. From MalCare’s dashboard, Access Security > Details > Apply Hardening.

If the error message is still shown, apply wordpress hardening

Here, you can implement different levels of hardening. In this situation, we recommend enabling the following:

    1. Change security keys
    2. Block PHP Execution in Untrusted Folders
    3. Disable Files Editor
    4. Reset All Passwords

Once you’ve done this, you and any other user of your WordPress site will be automatically logged out of your site. You’ll have to log back in.

After you log back in, the prompt Are you sure you want to do that? will disappear and you can carry on with your tasks.

2. Clear Your Cache And Cookies

Sometimes, to resolve the error, you need to clear your browser’s cache and cookies. The cache stores data of previously loaded pages and this can clash with your current task.

This doesn’t always work, but it’s second on our list of measures because it’s easy to do. You wouldn’t want to go through a long list of measures and find out all you had to do is clear your cache.

To clear your browser cache, you can go to your browser like Google Chrome or Mozilla Firefox. Go to History > Show Full History > Clear Browsing Data.

Here, select Cookies and Cache and click on Clear Data.

clearing your cache can help solve the error

Next, you also need to clear your website’s cache on the server.  We recommend using a plugin like WP Super Cache Plugin or W3 Total Cache Plugin. Install it and follow the instructions given by the plugin.

Now, go back to the task you were trying to do and check if the warning Are you sure you want to do that? has disappeared.

If it hasn’t, you can continue with the steps below.

3. Check Plugin or Theme Upload File

If you are trying to upload a theme or plugin and are facing this error, it’s likely that there’s a problem with the zip file. It might be incorrectly formatted.

Note: If you are trying to install a pirated theme or plugin, we strongly recommend that you discontinue your actions. Such software is often riddled with malware that will infect your WordPress site once you install it.

To override this warning and install your plugin, you can try the following steps:

Step 1: Log into your web hosting account. Go to cPanel > File Manager.

Step 2: Find the public_html folder and open the wp-content folder.

Step 3: If you’re uploading a theme, go to the themes folder. If you’re uploading a plugin, open the plugins folder.

wordpress folders wp content

Step 4: Upload your theme or plugin zip file here, and then unzip the folder. Once done, delete the zip file.

Step 5: Go back to your wp-admin dashboard. You should see the theme or plugin present here. You will need to activate the plugin or theme to start using it.

4. Check Your WordPress Plugins

Many times, the culprit is a plugin that is either not compatible with your WordPress installation or it has improper coding. Before proceeding, we advise you to delete any plugins that are inactive on your site and ones that you don’t use anymore. This removes unnecessary elements on your site that can cause security issues. Plus, it makes your task of finding the faulty plugin easier.

To check your plugins, follow these steps:

Step 1: Put your site into Maintenance Mode to ensure your visitors can’t see any changes that reflect on your live site while you check your plugins.

Step 2: On your WordPress dashboard, go to Plugins. Select all and disable the plugins.

deactivate plugins on wordpress

PRO TIP: If you are unable to do this from your dashboard, you need to access your plugins folder manually. Login to your hosting account. Go to cPanel > File Manager > public_html. Here, you will see a folder called wp-content. Inside it, you’ll find your plugins folder.

plugins folder on wordpress

Rename this folder to pluginsOFF. Your plugins will be deactivated.

Step 3: Go back to the task you were trying to carry out and check if the error Are you sure your want to do this? has disappeared. If the error persists, then your plugins are not causing the issue. You need to carry on with the steps below.

If the error is gone, you’ve found the cause!

Step 4: You need to activate each plugin one by one and check if the error appears.

If you used the manual method and renamed your folder, you need to rename it back to plugins.

Next, inside the plugins folder, deactivate each plugin individually by adding the suffix ‘OFF’. For example, askimetOFF.

Now reactivate the plugins one by one by removing the suffix OFF. Each time you reactivate a plugin, you need to check if the error appears on your site.

Once you find the plugin that’s causing the issue, you can deactivate or delete the plugin to get rid of the error Are you sure you want to do that?

 

5. Check Your WordPress Theme

If the error is still popping up on your WordPress site, you can move on to checking your theme. Deactivate the theme you are using on your WordPress site. Go back to the task you were trying to do and check if the error has been resolved.

If it has disappeared, then you’ve found the reason for the error. There are three steps you can take to resolve an issue with your theme:

    1. If there is an update available, update to the latest version.
    2. Delete and reinstall your theme.
    3. Find a new theme and change your theme to one that is compatible.

We advise you to take precautions while making changes to your theme. Use a staging site to make changes to your site’s theme. A staging site is a clone of your site where you can test changes without affecting your live site. Once you’re happy with the changes, you can push your changes to your live site. This will ensure your site doesn’t break while you update, reinstall, or change your theme.

6. Increase Your PHP Memory Limit

PHP is a programming language that is used to create your WordPress website. To allow the language to perform its tasks on your site, it needs to use what is called PHP memory.

Under PHP Memory, there are two instances in which you can face this error:

    1. To reduce the use of this memory limit, WordPress limits the size of images and posts by default. For example, the maximum image size you can upload is 1MB. If you are trying to upload a file that is larger than that, you will see errors.
    2. The default memory limit for WordPress is 32MB. When you reach your limit, WordPress will automatically increase the PHP Memory limit to 40MB. In case you exceed that as well, you will see the error Are you sure you want to do that?

To increase your PHP memory limit and your maximum upload limit, you need to add code to your wp-config.php file and .htaccess file. Follow this Guide to Increase Memory Limit from our friends over at wpmudev.

Once you increase your PHP limit and upload limit, the error Are you sure you want to do that? will disappear.

Final Thoughts

The error Are you sure you want to do that? has been termed the vaguest error on WordPress because it can have several causes!

But now that you know how to troubleshoot and fix this error, you’ll realize that it’s not so vague. To summarize, if you see this error:

    • Scan your site for malware and fix any hacks
    • Clear your cache and cookies
    • Investigate your plugins and themes
    • Manually upload your theme or plugin file that you want
    • Increase your PHP Memory Limit

While many of the underlying causes are simple to resolve, the most dangerous one is a hacked website. Hackers break into your website to misuse it to carry out fraudulent activities and scams. They generally try to operate without showing any signs of a hack. But they might be giving themselves away unwittingly by triggering this error.

To prevent such disasters, always keep a WordPress Security Plugin such as MalCare active on your website. The plugin will scan your site for suspicious activity and alert you immediately. It will also proactively defend your site by preventing hackers from accessing your site.

Keep Your WordPress Site Protected With MalCare!


wordpress are you sure you want to do this

The post How to Fix “Are You Sure You Want to Do This?” Error in WordPress site appeared first on MalCare.


*** This is a Security Bloggers Network syndicated blog from MalCare authored by Melinda Bartley. Read the original post at: https://www.malcare.com/blog/how-to-fix-are-you-sure-you-want-to-do-this-error-wordpress/