You must enable cookies to use WordPress

[SOLVED] You must enable cookies to use WordPress

Posted in Web-development

Ater adding the MULTISITE option to WordPress (v 4.4.2) and then changing website address from subdomain to domain (e.g. from http://test.timeweb.com/ to http://test.ru/), there is an error "Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.".

First I found a walkaround by switching off cookies with define('COOKIE_DOMAIN', false);, but i thing it's wrong to switch cookies off at all.

So the solution is — add a string to wp-config.php above the string /* That’s all, stop editing! Happy blogging. */ :

  • define('COOKIE_DOMAIN', strtolower( stripslashes( $_SERVER['HTTP_HOST'] ) ) );