Title: Cookie error when logging in
Last modified: April 26, 2020

---

# Cookie error when logging in

 *  [wpallthetime](https://wordpress.org/support/users/wpallthetime/)
 * (@wpallthetime)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/cookie-error-when-logging-in-2/)
 * 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)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [6 years, 5 months ago](https://wordpress.org/support/topic/cookie-error-when-logging-in-2/#post-12734454)
 * 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](https://wordpress.org/support/users/wpallthetime/)
 * (@wpallthetime)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/cookie-error-when-logging-in-2/#post-12734607)
 * 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)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [6 years, 5 months ago](https://wordpress.org/support/topic/cookie-error-when-logging-in-2/#post-12734640)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/cookie-error-when-logging-in-2/#post-12734640)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
