Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

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

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Fix “Are You Sure You Want to Do This” Error in WordPress

Every once in a while, you might encounter a WordPress error like error establishing database connection or memory exhausted error. Those errors are somewhat helpful because they tell you exactly what the problem is. Then there are the unhelpful errors like “Are you sure you want to do this”. The reason why this error does not provide any information is simply because there are too many factors that may lead to this problem. In this article, we will show you how to investigate and fix “Are you sure you want to do this” error in WordPress.

Are You Sure you want to do this?

Why and When “Are you sure you want to do this?” Error Appears?

This error usually occurs when WordPress checks for Nonce in an admin url and the check fails. Nonce are unique keys or numbers which can be generated by a theme, plugin, or a core WordPress file for verification purposes. Nonces add a security layer to protect WordPress URLs, forms, and ajax calls from abuse.

‘Are you sure you want to do this?’ error usually appears when nonce verification fails and the most likely candidates to cause this error are plugins and themes not using nonce properly.

Investigating “Are Your Sure You Want to Do This?” Error

Most commonly, this error is caused by a plugin or theme that is installed on your site. To investigate which plugin or theme is causing the issue, you will need to deactivate all your plugins.

Investigating Plugins

Since a deactivated plugin can still cause the issue we need to make sure that no plugins are installed in WordPress without deleting them. To do that you need to connect to your site using an FTP client and rename plugins folder in /wp-content/ directory to plugins.deactivated.

After that you need to go back to the plugins page in your WordPress admin area. You will see notification for all your plugins which are now deactivated.

Plugins deactivated in WordPress

Now that all your plugins are truly uninstalled and deactivated, you can try to reproduce the error. If the error does not appear again, then this means that one of the plugins on your website was causing the issue. To figure out which plugin was causing the issue, go back to your FTP client and rename plugins.deactivated folder back to plugins.

After that visit the plugins page in your WordPress admin area and activate your plugins one by one and try to reproduce the error after activating each plugin until you find the one causing the issue.

Yes this sounds like a dreading task, but it is the only way for beginners.

Investigating Themes

If the plugins were not causing this issue, then it might be a theme causing the problem. You can investigate the theme causing this issue by repeating the same procedure you did for plugins. First you need to connect to your website using an FTP client and download your currently active theme to your computer as a backup. Once you have backed up your theme, delete it from your web server.

Now visit Appearance » Themes page in your WordPress admin area and you will see a notifcation that ‘The active theme is broken. Reverting to the default theme’. WordPress will now start using the default theme like Twenty Thirteen for your website.

Now try to reproduce the error, if you are unable to reproduce the error then this means that your theme was causing ‘Are you sure you want to do this?’ error.

Unable to Find The Source of The Error

Make sure that you have tested thoroughly to reproduce this error after deactivating and reactivating your plugins and themes. Once you are confident that no plugin or theme on your site is causing the problem. Then there are a few extra steps you can take.

First make sure you have a full backup of your website. Next, delete all WordPress files from your server except wp-content directory and all its contents. After that download a fresh copy of WordPress extract it on your computer and upload the files inside the wordpress directory to your web server.

Once you have uploaded all the files, create a new wp-config.php file in the root directory. You can look at your old wp-config.php file from the backup if you need help. Add all sections except ‘Authentication Unique Keys and Salts’. Delete all the lines starting with define in this section.

 * Authentication Unique Keys and Salts.
 * Change these to different unique phrases!
 * You can generate these using the {@link 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=J<cN_ +6D{YhrM|=E#C7gD}]c2w~OJ} y}eY^,HWn&-j:a');
define('LOGGED_IN_KEY',    'PtDl2V|01oIXDpq^K,IH-8|rhT +T(ZMpuLq>UD?|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#<a0|u- #+SsS@-#$vNz}EY4rY~-x|0_6=Q!TR=MMxUL?');
define('SECURE_AUTH_SALT', 'n]^c9nY>_}3,4)J]S sM6-MI3aB#Qk<Re^j#Lu_|x^*BhO.54aZQTtzJeCo5DWAg');
define('LOGGED_IN_SALT',   'Ba3kd1&J$~~`(|uJ0:v;w+DJ3xW}.B#R9J*r|.+V}*sTuK &8db-Mn+[boHW3{[/');
define('NONCE_SALT',       'nBv-U1qfkCZxS|13%hYdHz*s1^){.KSZWm1A^${`r!d5;EqrH:>1Xx`pwt6?**i}');

Save and upload your wp-config.php file. Now check your website again and try to reproduce the error.

We hope this article helped you fix “Are You Sure You Want to Do This” Error in WordPress.

We understand that troubleshooting such issues can be frustrating at times. Try to stay calm, and if you need help you can always send us your questions by leaving a comment below.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. ekpono says:

    it worked. I copied the theme file into wp-content folder. thanks guys

  2. Keith says:

    I had the “Are you sure you want to do this”..but I was attempting to load the .zip file of “All files and Documentation” from theme forest.

    I instead downloaded the .zip of “Installable WordPress Files Only” and loaded that the stand way in Appearance -> Themes and it worked.

    Maybe this will help some folk.

  3. Greg says:

    Clearing personal browser cookies for the specific site did the trick for me. May help someone out . . . may as well clear personal browser cache too . . .

  4. Maria says:

    I’m not sure if that’s possibly the reason (I’m the super newbie) but after dragging the zip file to the desktop instead of uploading directly from the download folder it worked. :)

  5. Phill says:

    Guys, it worked for me this way:

    Go to your wordpress folder project —> wp-content.

    Extract your theme to this folder. Don’t try to put in a .zip file.

    I hope this can help you.

  6. rediyus says:

    thank you wpbeginner! it’s really helpfull

  7. avinash says:

    i am getting message while uploading new zip theme “Are you sure you want to do this?

    Please try again.” please me so that i will able to host new theme

  8. Ijaz Ahmad says:

    Themes uploading time error sir plz help me
    Warning: POST Content-Length of 30017322 bytes exceeds the limit of 8388608 bytes in
    Unknown on line 0
    Are you sure you want to do this?

    Please try again.

  9. Alex says:

    So I found the plugin that is causing the error. How do I fix it?

  10. Tahir says:

    I thing this very easy go to wordpress -> wp-content -> theme and upload your file without .zip

  11. Dileep says:

    I.m getting error while uploading new theme.

    Like this…
    ” Are you sure you want to do this?

    Please try again ”

    Please find solution

  12. diseño web mallorca says:

    Thnks for the fix

  13. Varun Jain says:

    Just increase the size of file upload and execution time.

    max_execution_time = 180
    max_input_time = 600
    post_max_size = 128M
    upload_max_filesize = 256M

    and restart all services will work fine.


  14. Gershon says:

    I am writing new theme (follow a book) and I get this fuzzy error message when I try to activate it.
    None of suggested is worked for me. (

    • Andrew Lopez says:

      Hello Gershon –

      I performed the same steps in the article and was unable to resolve my issue as well. I received the same error message as the article describes and noticed my upload size was only 2MB. I plan on increasing the upload size and this should (hoping) to resolve my issue.

      How big is your upload size? See if this is your issue.


    • Adam says:

      I was having the same problem. All other themes that I have in the themes folder were absolutely fine and activated fine. However one theme was giving me this error when I tried to activate it. On closer inspection, I found that I had spaces in the theme folder name, i.e. I had called the folder which contained the theme files “Primary School Theme”. When I removed the spaces, the error went away. Hope this helps

  15. LP_Dave says:

    I don’t think I understand the steps in the last solution. I’m confused by the wording: So I don’t add the section “‘Authentication Unique Keys and Salts”, which means don’t keep any of the green text. But then if I delete all of the lines that begin with define, that eliminates all of the remaining posted text. So am I just removing all of these lines from the wp-config.php file?

    Edit: I was actually able to solve my problem by creating a php.ini file, similar to Anthony Gore’s suggestion, through cPanel. I still think the instructions above are confusing though.

  16. Andrew says:

    I got this at login so had to do the plugins and themes deactivation through FTP. Still couldn’t find the issue but then had a look at the URL and it was not just it was like an old URL where I had been clearing the cache of my browser and it logged me out the site. So I was trying to login to what was probably an old temp URL that didn’t exist anymore.

  17. mohsin says:

    this is the problem for Ripped themes ??

  18. Dayley says:

    been trying for days, how & where can I find php.ini?!

    • Mukhtar says:

      create a phpinfo page and find ‘Loaded Configuration File’ variable

    • Tashreef Shareef says:

      Login to your server using FTP. Then find php.ini under /etc/php5/apache2.

      • Tondrux says:

        etc/ is empty for me.

      • jbc says:

        old problems but same solutions : Incase one of you are not able to locate php.ini, please create a new php.ini or contact your hosting provider, they will give access to php.ini, if they don’t give, then create a php.ini..
        btw I faced this, and I am an actual newbie on wp…

        current status resolved after creating new php.ini.

  19. Anthony Gore says:

    It’s often caused by php.ini settings. If this error is happening when you’re trying to upload a file, it’s probably your max post size or max file upload size. Find php.ini and change these settings:

    max_execution_time = 180
    max_input_time = 600
    post_max_size = 128M
    upload_max_filesize = 256M

  20. robrecord says:

    I fixed it by removing cookies for the site in question. It was because I moved the install to a new server.

  21. Syed Balkhi says:

    Did you try replacing the SALT keys from your wp-config.php file (last solution in the article) ?

    • Saqib says:

      I’m in the same situation also, the last solution doesn’t make sense, must be something to do with the premium theme I’ve downloaded… I’ll have to get in touch with the author.

      Btw doesn’t mention, it’s compatible with WP 4.0… #damn

  22. Algot Henge says:

    No joy. Brand new install of WordPress. No plugins. No other themes except default. Same error. That must not be the problem, but I can’t figure it out.

  23. Luke Woods says:

    I just upgraded to 4.0 and now I cannot publish any posts- can I roll back to 3.9?
    Please comment, Best. Luke

  24. Ken says:

    Tried changing the config file as you suggested. No difference. Still cannot spam/trash comment

  25. Ken says:

    I have an issue with a practically clean install of wordpress (latest version). All plugins deleted. Theme is “Twenty Thirteen”. I get this message when trying to delete a single comment. (I haven’t tried changing the config file to take out the definitions of the keys).

    The interesting part is that the box:
    “Users must be registered and logged in to comment” is checked.
    The box
    “Anyone can register” is not checked.

    I am the only user at this point.

    The comment was made by Derrick %/hdkspjbhk805

    There may be some issue that does not enforce the rules.

    And then the leak somehow messes up the comment stack.

  26. Owen says:

    I sometimes have this issue when trying to save jetpack custom css and I’m not sure why.

  27. karen says:

    Can’t deactivating your theme cause problems with you widgets no longer having their content as set up — and then — you are stuck redoing what might add up to significant duplicate work? I’m not advanced enough to know if I’m even asking that question correctly. But recently I worked on a site, switched themes and than ARGH! I had to go back and redo a lot of work getting the right content back into the right widget.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.