You click Save, publish a post, or install a plugin — and instead of the result you expected, WordPress stops you with a blank page that says: “Are you sure you want to do this? Please try again.” No explanation, no error code, just a dead end. If you have hit the are you sure you want to do this WordPress error, you are not locked out and your site is not broken. In almost every case it is a failed security check, and the fix takes minutes once you know which one.
This guide explains what the message actually means, the five causes behind nearly every case, and the fixes in the order you should try them — from a 10-second refresh to re-uploading WordPress core files.
What the “Are You Sure You Want to Do This?” Error Means
WordPress protects admin actions with a security token called a nonce — short for “number used once.” Every time you submit a form, save settings, delete a post, or install a plugin from the dashboard, WordPress attaches a nonce to the request. When the request reaches the server, WordPress checks the token with wp_verify_nonce() or check_admin_referer(). If the token is missing, expired, or does not match, the request is refused and you see the “Are you sure you want to do this?” page.
The check exists to stop cross-site request forgery (CSRF) — attacks where a malicious page tricks your browser into performing an action on your site while you are logged in. The nonce proves the request genuinely came from you, from your own dashboard, in your current session. When verification fails, WordPress would rather block a legitimate action than risk letting a forged one through.
One thing worth knowing: on current WordPress versions, the same nonce failure usually reads “The link you followed has expired” instead. The older “Are you sure you want to do this?” wording still appears on older installs and in some admin flows. Both messages mean the same thing — a nonce check failed — and the fixes in this guide work for both. If you have already seen the newer wording, my guide to fixing the link you followed has expired error covers that side of it in detail. DreamHost’s guide to this exact error confirms the same diagnosis: a failed nonce, most often caused by a faulty plugin or theme, a low PHP memory limit, or corrupted core files.
Nonces are time-based. By default a WordPress nonce is valid for 24 hours, split into two 12-hour “ticks.” That sounds generous, but in practice the window feels much shorter: a nonce is tied to the page you loaded, so a settings page left open overnight will hold a token that has already expired by morning. Refreshing the page generates a fresh one, which is why the simplest fix works so often.
What Causes the Are You Sure You Want to Do This WordPress Error
Five causes account for nearly every case:
- An expired nonce. You left an admin page open for hours — or days — then submitted it. The token had already expired. This is the most common and most harmless cause.
- A cached page serving a stale nonce. A caching plugin or CDN cached a page that contains a nonce-protected form, then served the same saved HTML — with the same old token — to later sessions. The token no longer matches, so verification fails every time.
- A plugin conflict. Security, caching, and session-handling plugins are the usual suspects. A plugin that changes how cookies or sessions work, or one that strips or rewrites nonces, can break verification site-wide — often right after an update.
- A theme conflict. Less common, but an outdated or badly coded theme can interfere with admin requests, especially if it hooks into admin pages or loads its own scripts there.
- Low PHP memory or corrupted core files. When WordPress runs out of memory mid-request, or a core file that handles verification is damaged, the same generic message can appear — WordPress shows it whenever it cannot complete the action, not only for nonce failures.
The pattern tells you the cause. It happens once after a long-open tab? Expired nonce. It happens consistently, right after the page loads? Stale cache. It started right after a plugin update? Plugin conflict. It happens on every upload or install? PHP limits.
How to Fix the Are You Sure You Want to Do This WordPress Error
Work through these in order, fastest first. Most people stop at step 1 or 2.
1. Refresh the page and try again
Go back to the page where the action failed, refresh it, and submit again. A refresh loads a fresh nonce tied to the current 12-hour tick, which clears roughly half of all reported cases. If you were editing a post, copy your text first — a refresh discards unsaved changes.
2. Log out, clear cookies, and log back in
If refreshing does not work, your login session itself may be the problem. Log out of WordPress, clear the cookies for your domain in your browser, then log back in and retry. Nonces are user-specific and session-specific, so a fresh login generates tokens that match your current session exactly. While you are at it, check that your browser accepts cookies from your site — WordPress cannot verify a nonce at all if the session cookie is blocked.
3. Purge every cache layer
If the error keeps happening on the same action, a stale cached page is probably serving an old nonce. Purge in this order: your caching plugin’s cache (and any object cache, such as Redis or Memcached, from your hosting panel), your CDN cache if you use one, and your browser cache with a hard refresh (Ctrl + Shift + R on Windows, Cmd + Shift + R on Mac).
Then check your caching setup: logged-in users and admin pages should be excluded from full-page caching. A cache that stores admin pages is a bug, not a feature — every cached form it serves carries a nonce that will fail. If the error only appears on a specific page, excluding that page from caching is the permanent fix.
4. Deactivate your plugins one at a time
If the first three steps do not fix it, a plugin is the most likely culprit. Go to Plugins in your dashboard, deactivate everything, and test the action that failed. If it works, reactivate plugins one at a time, testing after each one, until the error returns — the last plugin you activated is the problem. Update it, replace it, or contact its developer.
If the error blocks you from reaching the dashboard at all, do the same thing by FTP or your host’s file manager: open wp-content, rename the plugins folder to plugins-off, and test. WordPress will see no active plugins. Then rename the folder back and reactivate plugins one at a time from the dashboard. Security plugins, caching plugins, and anything updated in the last few days go first on the suspect list. If a plugin conflict turns out to be behind a blank screen instead, the same isolation method works — see my guide to fixing the WordPress white screen of death.
5. Switch to a default theme
With plugins ruled out, test your theme. Go to Appearance > Themes and activate a default WordPress theme such as Twenty Twenty-Five. If the error disappears, your theme is interfering with admin requests — check for an update, or contact the theme developer with the exact action that triggers it. Switch back to your theme only after the cause is confirmed.
6. Raise the PHP memory limit
If the error appears mainly when you upload files, install plugins, or run heavy admin actions, WordPress may be running out of memory. Open wp-config.php in your site root and add this line just above the “That’s all, stop editing!” comment:
define( 'WP_MEMORY_LIMIT', '256M' );
Save the file and retry the action. If your host caps memory below the value you set, the line will have no effect — check with your host or raise the limit from your hosting panel instead. For the full walkthrough, including the difference between WP_MEMORY_LIMIT and the PHP memory_limit setting, see my guide to increasing the WordPress memory limit.
7. Re-upload the WordPress core files
If nothing else works, a core file may be damaged. Download a fresh copy of WordPress from wordpress.org, unzip it, and upload everything except the wp-content folder and wp-config.php over your existing installation by FTP. This replaces core files without touching your content, themes, or plugins. Back up first — always — and if you do not have a backup routine yet, my WordPress backup guide walks through the setup. WP-Staging’s walkthrough of this error lists the same six fixes in the same order, with re-uploading core files as the last resort. After the re-upload, log in and test the action that failed.
How to Stop the Are You Sure You Want to Do This WordPress Error Coming Back
Fixing it once is good; making sure it stays fixed is better. Four habits prevent most repeat cases:
- Keep plugins and themes updated. Nonce bugs get fixed in updates, and outdated plugins are the biggest trigger after caching. Update on a staging site first if the plugin touches security or caching.
- Exclude the admin area from caching. Your caching plugin and CDN should never cache logged-in sessions or
/wp-admin/pages. Check this setting after every caching plugin update — it is the one that silently resets. - Do not leave admin pages open for hours. If you step away from a long settings page, refresh it before you hit Save. It takes one second and guarantees a fresh nonce.
- Use the Health Check plugin to test safely. The free Health Check & Troubleshooting plugin from WordPress.org lets you disable plugins and switch themes in a troubleshooting mode that only you can see — visitors keep seeing the normal site while you isolate the problem.
Frequently Asked Questions
Is the “Are you sure you want to do this?” error a hack?
Almost certainly not. In the vast majority of cases it is a timing or caching issue — an expired token or a stale cached page — not an attack. The message appears precisely because WordPress blocked something it could not verify. If the error is persistent and no fix above helps, scan your site with a security plugin and check your server logs, but start with the refresh and cache steps.
Why does it happen on only one action?
Because nonces are tied to a specific action, user, and session. A stale nonce on one form — say, the plugin installer — does not affect other forms that loaded fresh tokens. If one action fails consistently while others work, suspect a caching rule or a plugin that hooks into that specific action.
Does clearing my cache delete anything important?
No. Purging a cache only removes saved copies of pages. WordPress rebuilds them on the next visit. Your posts, media, settings, and database are untouched.
Wrapping Up
The “Are you sure you want to do this?” error looks alarming, but it is WordPress doing its job: refusing an action it cannot verify. Start with a refresh, then a fresh login and a full cache purge — that combination resolves most cases. If it persists, isolate plugins one at a time, test your theme, raise the memory limit, and re-upload core files as a last resort. Once it is fixed, exclude the admin area from caching and keep your plugins updated, and the message should stay gone.
If the error keeps coming back on a client site or a store you cannot afford to take down, I can diagnose it for you. Get in touch through my contact page and I will track down the cause and fix it properly.