I have came across the WordPress logout error several times but I really never figured out the cause of it. In earlier days, it was generally that I was missing a nonce but now even with logout link generated by wp_logout_url();, I am greeted with the WP die screen:

You are attempting to log out of SITE
Do you really want to log out?

What causes this to trigger at the first place?

Edit: Like I mentioned it was happening randomly, I think I figured out something. IT works fine with link generated by wp_logout_url(); but as soon as I use a $redirect parameter in wp_logout_url( $redirect );, I start facing the issue.

Any light on the matter?

  • I'm having the exact same problem. Did you ever figure this out? – emersonthis May 29 '12 at 21:09
  • @Emerson Nope! And didn't ran into again. I mean didn't have to use it after that. – Ashfame May 30 '12 at 6:38
  • have you set an exit() after the redirect? – kaiser Jun 19 '12 at 0:15
  • 1
    @kaiser I wasn't manually redirecting here. Just letting the function know that it should redirect. I guess the function would be doing / is supposed to exit() after redirecting, but I didn't check the source when I had this issue. – Ashfame Jun 19 '12 at 11:40

This message is raised by wp_nonce_ays() which is called by check_admin_referer().

Your browser has probably not sent a referer header, so WordPress could not validate the nonce. This may be a problem in your browser settings or your network connection.

| improve this answer | |
  • So its totally a hiccup and nothing else? – Ashfame Jul 3 '12 at 5:19
  • Impossible to tell for sure without seeing it. But it seems to be random … you may sit behind a proxy that changes your request headers. – fuxia Jul 3 '12 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.