recently I had the problem where on login page Wordpress reported an error:

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

This was asked several times here and also on other platforms. I have pinned it down to my custom plugin. Deleting the contents of the php file didn't solve but only renaming it. I pinned down the error to headers_sent() check in wp-login.php.

1 Answer 1


The problem was some empty spaces in custom plugin outside of <?php ... ?> enclosure. This is not a specific issue for cookies and the error is misleading. My custom plugin was only a single php file with 2 extra empty lines. The existing popular question about the same error message doesn't include any answers regarding empty lines. The question is also protected by the community. That is why, I needed to answer in a separate question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.