Support » How-To and Troubleshooting » WordPress Requires Cookies

WordPress Requires Cookies

  • hypernayte


    I just upgraded to WordPress 2.3, but am now getting this error, when trying to log into http://www.example.com/wordpress/wp-login/index.php:

    “ERROR: WordPress requires Cookies but your browser does not support them or they are blocked.”

    Is there a workaround for this? I have checked my cookie settings in both Firefox and IE, both of which seem fine and both of which will return with the above error.



Viewing 14 replies - 1 through 14 (of 14 total)
  • edithfrost


    Uhh… yeah. Me and this one other guy were having the same problem with 2.3-RC1.


    I didn’t upgrade today, I was waiting to see if more people would show up with this error. And I still have no idea what it’s about or how to get in once you’re locked out, short of deleting the database and starting over. Very sad.

    Running 2.1.3 and getting the same error. Both IE and FF are cookie enabled.


    The following from Jeremy cured both the cookie error and the other problem in the post. Try it folks. It worked for me.


    I have the same error now ? tried that cmkuk suggestion but still not working ? help please ?

    I find that turning cookies on, then going to my blog site can help with this.

    i tried the fix too and nothing. help! i’m going nuts.



    I just installed WP 2.3.2 in a separate directory from my 2.1.3 installation. The two installs are reading from the same database. When I try to log in to the 2.3.2 install, I get the error message about cookies mentioned by the original poster on this thread. However, cookies *are* enabled. I’m using Firefox on Ubuntu 7.10.

    Like bakedown, I tried the suggested fix with no joy. I can log in to the 2.1.3 install. Are the two installs somehow conflicting with each other? Should I delete the new install and try again? I’m a bit wary of upgrading in case I hose the whole setup (backups are nice, but…)



    I am having the same problem as bakedown. i’m dead in the water. Using IE7 with privacy settings set to accept all cookies. Help!!!

    I have installed wordpress 2.3.2 for the first time. I have finally gotten to the login page and I get this message: ERROR: WordPress requires Cookies but your browser does not support them or they are blocked.

    I changed Safari to always accept cookies but the error message persists. Also tried with Firefox, same message. I cannot even begin to post or edit the blog.

    Can anyone help?

    I just found a note in the forums that said the error looked like it might be caused by whitespace in the config file. I looked at it again and saw whitespace below the ?> at the end of the page. I removed it all the way to the last character and replaced the file online. IT WORKED!

    I had the same trouble and found a post that mentioned deleting themes that may not be compatible with my version of WP. I deleted the directory of the theme that I questioned and everything worked again. I’m now careful to only apply themes that say they are compatible with my current version of WP.


    you get my kindest thanks for using the search, good for you 🙂

    // 3 week old post, great.

    Thought I had found a fix, and posted in another thread about it, but it wasn’t correct, although I am on the right track I think.

    For my site I’m working on locally, the URL is ‘localhost/WorstOf’. When the server fills out the $_COOKIE array, it does so with cookies with a path of ‘/WorstOf’. However, if I go the site with the URL of ‘localhost/worstof’ (note the case), it fills $_COOKIE with cookies with a path of ‘/worstof’, but WordPress is looking for cookies with a path of ‘/WorstOf’, and they don’t match.

    So, the URL you type into the address bar has to match the case of the ‘siteurl’ you have setup when you configured your WordPress blog, as that is what the COOKIEPATH define is made from. If your ‘siteurl’ is ‘/MySite’, then you must put ‘/MySite’ in the address bar. ‘/mysite’ will take you to your site, but WordPress will look for cookies with a path of ‘/MySite’, and will always be empty.

    So, you actually get logged on, but the blog can’t detect it if your address and ‘siteurl’ don’t match. But then what happens, is when you ignore the error and go about your business, behind the scenes, WordPress will redirect to your ‘siteurl’, and then the cases match up again, and all is well with the world.

    So, what we need to do is detect this mismatch and redirect from the get-go. Here’s what I did.

    In wp-blog-header.php, I added the following code at line 18 between
    require_once( dirname(__FILE__) . '/wp-config.php');

    (code to insert)


    I use COOKIEPATH because it is built from ‘siteurl’ and is exactly what I need to check the current URL against. I put it in wp-blog-header.php because index.php is the only file to include it and we only need to catch this mismatch at the first entrance to our site, and the site will then use the proper case for the rest of the session.

    Once I did this, all my problems went away. I haven’t done full on extensive testing of every single feature of the site, but so far this has served me well and has shown no ill-effects. Any combination of case in my url will now work (‘/WoRsToF’, ‘/worSTof’, ‘/WORSTof’, etc…)

    Anyone who sees a problem with this, or can find a better place to put such a check, or even a better solution outright, please let us know. But for now, I think this will help out some of you having the same problem I did.

    stonicus: This largely has to do with the case sensitivity difference between *nix and Windows. The path part of the URL is determined by the webserver, and since Windows is not case sensitive on files, neither is a Windows web server. However, most of the web servers in the world run on *nix boxes, which are case sensitive, and so there you go.

    WordPress is case sensitive because that is the de-facto standard for this sort of thing.

    This is why it is generally bad form to use any upper case characters in the URL. Always stick to lowercase.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘WordPress Requires Cookies’ is closed to new replies.