How to Fix “Are You Sure You Want to Do This? Please Try Again” Error in WordPress
In many cases, WordPress tells you exactly what went wrong when you run into an issue. However, that’s not the case with the “Are you sure you want to do this? Please try again” error. The message itself doesn’t give you any helpful information for fixing the problem.
Fortunately, the WordPress community is very active, and we know exactly what the (many) causes of this error are. In this article, we’re going to talk about six ways to deal with this problem, including:
- Deactivating your plugins and reverting to your default theme.
- Increasing your PHP memory limit.
- Resetting your WordPress security keys.
- Checking your WordPress uploads for unsupported file formats.
- Clearing your WordPress cache.
- Upgrading to a better hosting provider.
As you can see, we have a lot to talk about. Don’t be intimidated, however, as these fixes are mostly quite simple. Let’s jump right in!
What Causes the “Are You Sure You Want to Do This? Please Try Again” Error
When it comes to troubleshooting, your first move should always be to read any error messages you’re getting. In a lot of cases, this will tell you everything you need to know to fix whatever problem you’ve encountered. However, some errors aren’t quite so helpful.
The “Are you sure you want to do this? Please try again” error is one of the worst culprits when it comes to providing insufficient information. It can pop up when you’re trying to do just about anything in WordPress. However, some of the most common times you’ll run into it include:
- When you try to upload a plugin or theme.
- During a media file upload.
- When trying to publish a new post or page.
- While customizing a theme, post, or page.
- If WordPress runs into a PHP-related error, or your website encounters a security issue.
That’s a long list, and there aren’t any common denominators between all of these situations. To put it another way, the “Are you sure you want to do this? Please try again” error is WordPress’ way of saying: “Something went wrong and we’re not sure what it is. Let’s try again and see if it works this time!”.
In some cases, trying to perform the same action again won’t trigger the error a second time. However, in our experience, you usually have to fix the underlying issue before you can finish whatever you were doing. With that in mind, let’s look at how to troubleshoot this error.
6 Ways to Fix the “Are You Sure You Want to Do This? Please Try Again” Error
Since there are so many potential causes for this error, you need to be methodical when it comes to troubleshooting it. In this section, we’ll walk you through six ways to solve the problem, from the most to least likely solution.
If you’re lucky, you won’t have to try all of these fixes. However, don’t get discouraged if the first thing you try doesn’t fix the problem – just keep going!
1. Deactivate Your Plugins and Revert to Your Default Theme
Most WordPress websites use several plugins at once. In some cases, one or more of those plugins can cause compatibility issues with each other or your theme. The best way to find out of a plugin is behind your woes is to disable them one by one, until you either find a culprit or rule them all out.
If you have access to your dashboard, this process is simple. Just make your way to the Plugins tab, and deactivate each of your plugins in turn, starting from the top:
After you turn off each one, check to see if the “Are you sure you want to do this? Please try again” error persists (by repeating the action that triggered it in the first place).
If you make your way through all the plugins without results, go ahead and switch over to your Themes tab. Change your active theme, and check once more to see if the error is still happening.
Once you rule out plugins and themes as the source of your problem, you’ll want to reactivate them all. Then, move on to the next fix.
However, if you don’t have access to your dashboard, you’ll need to take another approach. To disable your plugins and theme, you’ll have to access your website via FTP, using a client such as FileZilla.
After connecting to your website via FTP, navigate to the public_html/wp-content directory. You’ll see several folders inside, two of which are called plugins and themes. Within those directories, you’ll find unique folders for each of your themes and plugins. Right-click on the plugins folder, and rename it plugins.deactivated.
This simple action will deactivate all your plugins in one fell swoop. Afterward, access your website again and try to reproduce the error. If it’s gone, change your plugin directory’s name back to just plugins. Then you can open it up and change each individual plugin folder’s name to pluginname.deactivated. As before, your goal is to turn each plugin off in turn until you narrow down the culprit:
If none of your plugins are at fault, remember to return their folders to the original names. Otherwise, WordPress won’t recognize them. Then, you’ll need to repeat the process with your active theme. Go into the public_html/wp-content/themes directory, and find the folder that corresponds to the theme you’re using. Change its name, so WordPress won’t recognize it:
Try replicating the error once more, to see if that change fixed it.
If a plugin or theme turns out to be at the root of your problem, you have a few choices. You can try updating it if possible, uninstalling it, or looking for an alternative that doesn’t trigger errors on your website. If none of them seem to be at fault, however, proceed to the next solution.
2. Increase Your PHP Memory Limit
WordPress runs on the PHP programming language. When your website tries to run plugins and scripts, it has a set amount of PHP memory it can use to do so. If those scripts run out of memory, they can trigger errors such as “Are you sure you want to do this? Please try again” or “Allowed memory size of XXXX bytes exhausted”.
These days, most WordPress web hosts set decent memory limits for your website out of the box, so this error isn’t that common. However, adjusting your PHP memory limit is quite simple, so it doesn’t hurt to try in case yours is set too low.
There are three ways you can increase your PHP memory limit in WordPress. The first one involves making a change to your server’s configuration, which you won’t be able to do if you’re using certain types of hosting. With that in mind, we’re going to skip right to the other two methods, which involve editing either your .htaccess or wp-config.php files.
Both of those are WordPress core files, which means they are highly important and contain settings that enable your entire website to run. When you’re editing either of them, therefore, you’ll need to be extra careful.
First, you’ll need to use FTP to log into your site’s files directly. Once you’re in, look for .htaccess, which is located within the public_html directory:
Right click on the file and choose the View/Edit option. This will open .htaccess using your default local text editor, enabling you to make changes to it. Now, scroll down to the bottom of the file without making any changes to the rest of its code. At the very bottom, paste the following snippet:
php_value upload_max_filesize 256M php_value post_max_size 256M php_value memory_limit 256M php_value max_execution_time 180 php_value max_input_time 180
This will set your max PHP memory size to 256 MB, which is more than enough to handle any scripts. Plus, you’ll also be increasing your file size upload limit, giving your website more time to upload files and process scripts.
After you’ve added the code, save your changes to .htaccess, and then close the file. FileZilla will ask if you want to save the changes to your server, so go ahead and say yes.
Next, try replicating the “Are you sure you want to do this? Please try again” error once more. If it’s gone, then you’re in luck. If it persists, however, there’s another file you can try editing to increase your PHP memory. It’s called wp-config.php, and it’s located in the same directory as .htaccess:
Locate it now, then open it using your text editor and look for the line that says Happy blogging! at the end of the file. Paste in this code right above it:
This will increase your PHP memory limit to 256 MB. Although you already tried to do this via .htaccess, sometimes (due to the way your server is set up) only one of these approaches will work. If the error persists after you save the changes to wp-config.php, however, it’s time to move on to the next method.
3. Reset Your WordPress Security Keys
Your WordPress security keys are also known as ‘salts’. They are cryptographic sequences the platform uses to protect the information it stores in your database. This may sound complicated, but you don’t need to understand all the technology involved. Suffice it to say that changing your salt keys can help fix security issues that could be triggering the “Are you sure you want to do this? Please try again” error.
WordPress stores your site’s unique salt keys within the wp-config.php file. As we mentioned earlier, you can find this file within the public_html directory. Just connect to your website via FTP and navigate to the folder, then open wp-config.php in your text editor.
Next, use your text editor’s search feature to find the line that reads “Authentication Unique Keys and Salts”. You’ll see a set of eight lines of code right below that, and you’ll need to replace them all:
To do that, visit this link from the WordPress API, which will generate a new full set of keys. Delete the existing lines, replace them with the new set you just generated, then save wp-config.php and close it. After that, try accessing your website again.
WordPress will ask you to log in, due to the change in your keys. Once you’ve accessed your dashboard, check to see if the error persists. If it does, you’ll need to keep moving down the list.
4. Check Your Uploads for Incorrect File Formats
WordPress enables you to add a wide variety of files to use within your posts and pages. The list of file formats the platform supports is quite extensive, and you can check them all out in the WordPress Codex.
One common cause of the “Are you sure you want to do this? Please try again” error is when you’re trying to upload a type of file WordPress doesn’t support. If you’re running into that problem, you can convert the file you want to upload to a format the platform can process. Otherwise, you’ll keep running into the same error over and over again while trying to upload the file.
So try saving the file in another format supported by WordPress, and adding it to your site. If you meet with no success (or if the action you’re trying to perform is something other than uploading a file), you’ll need to try something else.
5. Clear Your WordPress Cache
If you’re using a caching plugin with WordPress, you may run into errors when trying to make changes to your website. Fixing this problem is actually quite easy, as all you have to do is clear your WordPress cache. The problem is that the process required can vary, depending on which plugin you’re using.
For an example, let’s look at the WP Super Cache plugin. It’s one of the most popular WordPress caching plugins around, and it’s quite easy to use and configure. To empty your cache through this plugin, you have to navigate to the Settings › WP Super Cache tab in your dashboard. Once there, look for a section called Delete Cached Pages:
There’s a big button that reads Delete Cache right below, so you can’t miss it. Just click on that button, and the plugin will empty your cache.
Most other caching plugins include similar options. You can read more about how to troubleshoot W3 Total Cache or WP Fastest Cache in another guide from our archives. In any case, remember to check and see if the “Are you sure you want to do this? Please try again” error is gone after clearing your cache! If not, there’s one last thing to try.
6. Upgrade to a Better Hosting Provider
If you’ve gotten to this point and nothing has worked, chances are the “Are you sure you want to do this? Please try again” error is popping up due to a problem with your server’s configuration. That means you’ll need to ask your provider’s support team to help you troubleshoot the issue, which can take some time depending on how effective they are.
In any case, if you’re running into these kinds of problems due to your choice of hosting provider, it might be time to consider making a change. Ideally, you’ll want to use a web host that works well with WordPress. Here at Hostinger, for example, we offer WordPress-friendly plans at low prices, with lots of handy features and rock-solid support.
What’s more, migrating your website from one host to another isn’t as complicated as you might think. It can take up to a few hours, but you’ll save yourself a lot more time by not having to deal with so many errors in the future.
The “Are you sure you want to do this? Please try again” error can be intimidating since it doesn’t give you much information to go on. However, it’s one of the most well-documented errors in WordPress history. We know what its many potential causes are, and fixing it isn’t usually difficult. In most cases, you won’t need to try the full six methods we’ve outlined. If you’re seeing issues like this often, however, it may be time to change web hosting providers.
Do you have any questions about how to fix the “Are you sure you want to do this? Please try again” error? Ask away in the comments section below!
Learn How to Solve Other WordPress Errors
How to Solve “There’s Been a Critical Error on Your Website” Error
How to Use WP_DEBUG Tool
How to Solve Internal Server Error (500) on WordPress
How to Fix upload_max_filesize Errors in WordPress
How to Solve max_execution_time Exceeded Error
How to Fix “Parse Error: Syntax Error, Unexpected” in WordPress
How to Fix Broken Permalinks in WordPress