Get “Are you sure you want to do this” error

113 views Apr 25, 2016 Apr 20, 2017 faq 1

Sometimes customers report us about “Are you sure you want to do this” error when they trying to install theme. The reason why this error does not provide any information is simply because there are too many factors that may lead to this problem.

Why and When appears

Reason 1: 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.

Reason 2: Very low upload file size limit. For example, if your limit is 4MB and you are uploading a file of 10MB. Uploading process will be terminated after first 4MB and WordPress won’t receive any file.

How to fix

Here we will discuss the most common type of error fixes.

Deactivate all 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.

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.

Deactivate all 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.

Increase PHP upload size limit

If you have the right to edit php.ini file of your server, find memory_limit in php.ini file and increase the memory limit 64MB or higher as you need. Then, find max_execution_time, upload_max_filesize, post_max_size respectively and increase their limit.

Edit wp-config.php file

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.

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

Was this helpful?