• I started to get a problem logging into my website – this error message pops up:

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

    I then added this to wp-config based on some other posts I found:

    define(‘COOKIEPATH’, ”);

    This fixes the problem. But I’m unsure what impact this will have on my users – will it clear their cookies?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Defining the COOKIEPATH like this is a bad workaround. You should examine what is wrong with the cookie paths without this line being added.

    Thread Starter wpallthetime

    (@wpallthetime)

    Thanks Otto – I suspected it wasn’t a good situation to leave that in there. Could you share any pointers to troubleshooting docs to figure this out?

    I’ve tried basics like:

    * Removing plug-ins and am not really sure what else changed other than upgrading to recent version of WordPress.
    * I turned on logging but am not getting any error messages.
    * Added my site to the browser’s don’t block cookie list (doesn’t make a difference).

    After the failure, I can refresh the page and I’m logged in. So the error message seems like a red herring, and I could live with it but it’s rather annoying. Note the site is not https.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Remove the line or comment it out.

    Start an incognito window in Chrome.

    Open the inspector, and select the Network tab.

    Load your login page.

    In the request to wp-login.php in the network tab, under the Response Headers, look for a line like this:

    Set-Cookie: wordpress_test_cookie=WP+Cookie+check; path=/

    If that path is not right, then that is your problem. That should be coming from your home URL setting, generally speaking.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cookie error when logging in’ is closed to new replies.