You must enable cookies to use WordPress

If you try to log in but receive an error message such as:

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

screen-shot-2016-10-11-at-10-27-54-pm

You can fix it by inserting the following code into your wp-config.php file:

define( ‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ] );

NOTE: If you use WordPress Multisite please add or change the following line to your wp-config.php file:

define( ‘COOKIE_DOMAIN’, false );

 

 

7 Comments

  1. Vj

    I am using a multisite and was facing this issue.
    After I added the below code, there were no more issues for the primary domain.

    define( ‘COOKIE_DOMAIN’, false );

    However, I am getting cookie issue on other domains.

    How do I solve this?

    In addition to the above code, do I also need to add the code below for multisite?

    define( ‘COOKIE_DOMAIN’, $_SERVER[ ‘HTTP_HOST’ ] );

Leave A Comment?