WordPress login is blocked, cookies not supported?

I just setup a new Trellis/Bedrock Installation and I’m getting stuck on error I’ve never seen before when trying to login.

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

I have checked that cookies are enabled on Chrome/Safari/Fire Fox, tried private browsing, cleared cache, and I’m still getting blocked. The results from Google all seem to revolve around plugins/updates, which shouldn’t effect a fresh install (no plugins, theme: twentyfifteen)

Anybody have any insight?

EDIT: This might be an issue with this being a multi-site Installation and the domain_current_site being set incorrectly. The Trellis Docs say to use example.com though this is for my development environment.

EDIT2: Solved. domain_current_site: example.dev for development environment

Yep. Cookies are domain restricted. More info on how cookies work:

https://secure.php.net/manual/en/function.setcookie.php

path
The path on the server in which the cookie will be available on. If set to ‘/’, the cookie will be available within the entire domain. If set to ‘/foo/’, the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain. The default value is the current directory that the cookie is being set in.

domain
The domain that the cookie is available to. Setting the domain to ‘www.example.com’ will make the cookie available in the www subdomain and higher subdomains. Cookies available to a lower domain, such as ‘example.com’ will be available to higher subdomains, such as ‘www.example.com’. Older browsers still implementing the deprecated » RFC 2109 may require a leading . to match all subdomains.

https://tools.ietf.org/html/rfc6265#section-5.1.3

1 Like