Here is the best solution for Error: cookies are blocked in WordPress blog login page. I am have also suffered from this unfortunate Error: Cookies are blocked due to unexpected output in my WordPress [login.php] [page]. I felt terrible around of getting such an error in my login page and I can’t ready to login with my login credentials. By trying to login WordPress, it redirects to the same login page instead of entering into the dashboard.
Suddenly google with “Error: Cookies are blocked due to unexpected output in WordPress login.php”, I have seen a huge rundown of solutions around the internet by blogger and geeks. Attempted with different answers to fix the issues lastly, simply settle the issues with a couple of customs route from the distinctive blog’s.
Also, here I have listed the solution to fix the cookies blocked error, follows
#Steps to solve ERROR: Cookies are blocked due to Unexpected Output.
#Step 1: Login to your domain.com: Cpanel (or) FTP.
#Step 2: Renew your plugins folder with new name: plugins1
#Step 3: Go to yourdomain.com/wp-login.php, Check, if your login page still shows similar cookies blocked alert message, If no, at that point follow the steps underneath.
#Step 4: Login and enter into your dashboard to follow the steps,
#Step 5: Then, Go to the Plugins
#Step 6: Now your all plugins are in the deactivated mode, because of the plugins folder are renamed already.
#Step 7: Go to Cpanel or FTP, and then again rename your plugins1 to plugins. Then go back to the dashboard again. Check the plugin, all plugins now available for activation.
#Step 8: Activate the plugin one by one and also continue checking your login.php with a private window (incognito window) by completing a hot refresh (Ctrl + f5) it appears, regardless of whether this plugin influences your login page or not.
#Step 9: By following step 8, at that point, you will discover which plugin affecting your login page prompts the cookies are blocked.
In my WordPress theme, I have found that Force Regenerate Thumbnails affecting my login page with this error.
#Step 10: The expectation, you have likewise discovered your affected plugins. If, yes then open your affected plugin file. (My plugin: force-regenerate-thumbnails.php) from your plugin folder: public_html/wp-content/plugins/force-regenerate-thumbnails/force-regenerate-thumbnails.php
Note: Before editing any files, please store a backup file in your local computer.
#Step 11: Open the PHP file in editorial manager: preferred editor: notepad++ and Dreamweaver, so check the document at top have any white space or any additional code found before the open PHP tag [<?php tag], on the off chance that you appear to be any white space or extra code, make sure to clear everything in the place and furthermore check at end of the page in after closing PHP tag [?>] for any blank area or code, on the off chance that you have any, at that point please remove and upload it into a similar file location.
#Step 12: Again, go to Login.php from another browser; check whether that cookies blocked error has solved or not. It solved for me already 100%.
Another method to solve Error: Cookies are blocked in the Login page.
#Step 1: Open Cpanel (or) FTP, download error log from your server.
#Step 2: Open the file with notepad++ and check whether it has any following line.
Warning: Cannot modify header information – headers already sent by (output started at public_html/wp-content/plugins/force-regenerate-thumbnails/force-regenerate-thumbnails.php:144) in ../ public_html /wp-login.php on line 414
This will confirm that it is UTF-8 BOM issue and you could locate the file that has got the issue.
#Step 3: Open the file (In my case it was “force-regenerate-thumbnails.php” file) causing an error in Notepad++, which has got the issue. It will show you “Encode in UTF-8” selected under encoding option from the menu. You need to make sure that you have selected “Encode in UTF-8 without BOM” and it is NOT “Encode in UTF-8”, then click on “Convert to UTF-8 without BOM”, hit enter anywhere in your file and save.
#Step 4: Check now with login.php for error cleared or not, if not clear still, please contact us.
Hope, these 12 steps will give you a reasonable answer for your Error: Cookies are blocked due to unexpected output in WordPress login.php. On the off chance that despite everything, you have this error in your WordPress login page. Kindly don’t waver to get in touch with me, I will give you a free service to take care of your concern.
In the event that you found these steps have cleared your problem from the Error: Cookies are blocked in WordPress login.php, So, Please remember to share this post in your social platform, may a large number of your friends and bloggers are searching for the solutions. Help them out by sharing this post.
Lifesaver! I have been looking for a solution all week!
thank you so much for the clear instruction
Wow! Who would have guessed that two blank lines at the end of my child theme’s functions.php file would have caused so much grief. Glad I stumbled onto your post. Thanks.
Epic guide, dude! Totally saved my ass 😀 Thanks!!!
This worked 100% for me. I was on the line with the host and they made a staging sub domain, created a second database to debug, duplicated all the files and then I found this article. It worked so fast that I was able to fix the issue before the tech could delete all they had done. Thanks so much!