• ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

    After updating WordPress from 3.7.1 to 3.8, when I attempt to login at (https://mydomain.com/wp-login.php) I receive the above mentioned error message.

    This occurs in Firefox and IE. When logged into Chrome — you can’t logout.

    I have done the following:

    – Ensured cookies are not blocked
    – Deactivated all plugins
    – Substituted the wp-login.php from version 3.7.1
    – Commented out lines 744-746 in wp-login.php as recommended here: https://bit.ly/19cgudZ

    This seems to have happened to some people with 3.7.1 and now 3.8. Does anyone know how to fix this login issue?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter bella2011

    (@bella2011)

    Hi Mrinal,

    Thank you for the recommendation, however, we have already been in touch with our host – HostGator and it is not a server issue.

    Hi

    Did you tried the .htaccess file editing?

    Thread Starter bella2011

    (@bella2011)

    The back-end of the site was working fine prior to the WordPress 3.8 upgrade. Here is a screenshot of the error: https://bit.ly/1d5jn1l.

    Not sure how (or why) to edit the main .htaccess file to remove this error? The 3.8 upgrade was completed via the WP dashboard.

    (Note: Everything seems to work fine except for the inability to log-in due to this error and white pages showing up when an action is taken (i.e., activating a plugin or saving a post).)

    Hi Bella,

    Got a solution

    Add the following codes at the end of wp-config.php file at root folder.

    define('ADMIN_COOKIE_PATH', '/');
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');

    Clear your browser cache & check the issue again.

    Thread Starter bella2011

    (@bella2011)

    Hi Mrinal,

    Unfortunately the above mentioned code does not work when added to the root wp-config.php file. Thank you for trying. Hopefully someone knows how to fix this issue.

    @mrinal, your solution worked for me, but with some strange effects.

    I added those lines to config then logged in successfully. I then removed the lines, and was then permanently stuck in the admin panel. It would not let me log out, it would just go right back into the admin panel after clicking logout!

    So I re-added the lines, then successfully logged out. I then removed the lines, and it automatically logged me back in. So I logged out again and everything appears to be normal.

    WordPress team, you really need to look into this [Moderator note: There is no WordPress team]

    I would love to have the solution for this… I’ve tried all of the above.

    I had to debug this issue today. The actual solution may not be applicable to you, but I thought I’d share the debugging steps so that you may get more insight into what’s going on, or at least provide more information for others to looks into.

    Here are the steps for debugging in Google Chrome:

    1. Go to the login page (e.g. example.com/wp-login.php).
    2. Press Ctrl-Shift-C (or right-click on the page and choose “Inspect element”) to open developer tools.
    3. Enter the credentials and hit Log In — get the “Cookies are blocked …” error.
    4. In the developer tools pane, switch to the Network tab.
    5. In the Network tab, click on the top most item (e.g. wp-login.php).
    6. Select Headers tab and scroll down all the way to see the response.
    7. Look at the Set-cookie headers, pay attention to path= and domain=.

    The “Cookies are blocked …” error happens when the wordpress_test_cookie doesn’t get returned by the browser, which is likely to be caused by improperly set domain or path.

    Here is a screenshot that illustrates the steps and the issue.

    In my case, the problem was that WordPress set domain to the internal site name, and Chrome apparently decided to reject the cookie because it thought that the internal host name is a top level domain name or something (this behavior in Chrome got broken recently, it used to work). The workaround was to add

    define('COOKIE_DOMAIN', false);

    to wp-config.php. This is not necessarily a solution, but was good enough for me to proceed with what I needed to do.

    Good luck with figuring this out!

    -Artem

    I’m going to try Artem’s solution.

    One of my sites is having this problem with some users.

    If anything changes, I’ll be happy to know.

    Thanks

    Artem’s response helped me debug and figure out my problem. The problem was wp-config had define(‘COOKIE_DOMAIN’, ‘www.liveurl.com’);, but I was logging into a staging site with a different URL. I updated the URL to be the proper URL, cleared my browser cached, and was able to log right in.

    Thanks!

    I am having the same problem with this (ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.) It happened when I tried to install the Twitter plug in.

    Here’s the issue: How can I deactivate the plug in (which apparently solves the problem) when I can’t log into the site in the first place? I talked to the host (Hostgator) and they said the problem is WP.

    Please help!

    How can I deactivate the plug in (which apparently solves the problem) when I can’t log into the site in the first place?

    You can delete the plugin sources from the wp-content/plugins directory. This should deactivate the plugin. Googling for “how to deactivate wordpress plugin” gives plenty of other options.

    I’m not sure how it happened, but after trying multiple hacks/fixes, I opened my wp-config.php file and it was all one line, therefore the entire thing was commented out. So, not sure if anyone else has this problem, but take a look at wp-config.php, because after fixing it, I could login again.

    @artem: I do not post often but the solution you provided worked just fine for my Multisite. Thanks a lot!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘ERROR: Cookies are blocked or not supported by your browser.’ is closed to new replies.