Sometimes after customizing the thing or any plugins in wordpress It may be possible that you will get error like…

“ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums”

While searching for this on Google, you will be told by people to edit your wp-config.php and/or functions.php file and after doing that you found that its none of any use.

So, first step towards to get rid out of problem is to know the reason of the problem and the main reason of the above error in WordPress is that One of your active plugins or files like functions.php or other files of your themes may be producing unexpected output and that may be result into “Headers already sent” warning and it is consequently preventing test cookie to set in your wordpress and that is why you are not able to do login in your wordpress admin and/or front-end.

How to find the files which are causing this issue ? You will try to disabling all plugins one bye one or try to rename plugins folders name one by one to find out that which plugin is causing this issue and you will try the same with functions.php. But there is the simple way to find out the files which are causing the issue and that is the error_log and checking this file will help you to understand that exactly what causing the issue in minimum time of investment.


In screenshot; message and file name is highlighted with red borders. so There may be some extra space before or after staring or closing of PHP tag. Remove those extra spaces from these files and save and check you are able to do login again.

If you still not able to solve after removing spaces in the files then there my be one more possibility with the file encoding. Open your file with the error in notepad++ and change it’s encoding to UTF-8 without BOM


After doing all this stuffs and refreshing wordpress login page you will see the magic!!! It will work for you !!! However in some cases it can be plugin issue and renaming plugins folder can help. But before making any changes make sure you have checked the error logs so that you know what you are doing. When you know what you are doing, things are a lot easier and you save your precious time, isn’t it?

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.67 out of 5)