Hi Developers, this is a WordPress troubleshooting post. If you have ever experienced the following error in the login page of your WordPress website then this troubleshooting guide is for you.
“ERROR: Cookies are blocked due to unexpected output. For help please see this documentation or try the support forums”
I’ve searched lots of websites and guides online to troubleshoot this problem and finally come up with a solution that worked for me. I hope this guide will help you out as well. Please read the complete post carefully because some of you might have tried the initial step but I’ve added one more step in the last as per my experience.
- Login to the cpanel of your WordPress website and then open File Manager. In the File Manager navigate to the root of your WordPress installation.
- In the root of your WordPress installation, search for “error_log”. Download this file. This file usually contains the error related to various files and issues. With this file you can know the exact reason of the above said error
- Open the downloaded file in any text editor such as notepad and then scroll down to the last. In the last line check for the error message. If it is something like this –
“PHP Warning: Cannot modify header information – headers already sent by (output started at /home/trpservi/public_html/txedrights/wp-content/themes/supportdesk/framework/post-types.php:1) in /home/trpservi/public_html/txedrights/wp-login.php on line 415″
this warning means that the error is in the post-types.php file at line number 1.
4. In your File-Manager navigate to this directory and download the file indicated in the warning message. Open the download file in any text-editor and check for any blank space at the starting of the file.
5. The first character should be “<?php” not ” <?php”. Remove any white spaces in the starting of the file. Also note at the end of file there is not php closing tag like “?>” and no blank lines or spaces. If any remove them as well.
RELATED : How to enable debugging in WordPress ?
6. Save your file and upload it back to the same location overwriting the existing one. Now refresh your WordPress login page and you’ll see that the error has gone.
7. In case if the error is still there, again download the “error_log” file and then navigate to the last line and check for warning. This time you’ll same warning but in another file location. Correct that file in the similar manner and upload it back. I hope this will help you resolve your error.
I hope this guide will help you out getting this error. In case you’re facing any issue please let me know in comments below. I’ll help you out resolving your issue. Please subscribe us and share this post among your developer friends.