WordPress is one of the most popular CMS used for the management of websites. Sometimes after customizing the themes or plugins, there may be a chance of encountering the error like the wp-admin shows a blank page. If navigating to the page ‘wp-login.php’, it may show an error like mentioned below
“ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums”
In this article, let us discuss the possibilities to resolve this type of error which makes you unable to login the wp-admin page to update the website.
Solution to Fix Error ‘Cookies are blocked due to Unexpected Output’:
The main reason for this type of error is due to any active plugins, any files like ‘functions.php’ or any theme files which produces an unexpected output. It constantly displays a warning message ‘Headers already present’ and prevents WordPress in setting the test cookie on the system. The following solutions can help to sort out this type of error and make your WordPress dashboard accessible.
Method 1: Disable the Plugins
The first step is to identify the exact reason for the problem. The mentioned error may be due to any one of the active plugins or files like functions.php. Check by disabling the plugins and identify the problem-causing plugin.
Method 2: Check Error_Log
The simple method is to check the error_log and identify the problem causing file. The error_log file helps to identify the cause of the issue in minimum time. Identify the file name through the error log and check for any extra spaces before or after the closing of the PHP tag. Remove the extra spaces in the mentioned files and check again, now you can able to log in the wp-login page. Mostly this method will solve the error.
Method 3: Change File Encoding Type
If the above method also doesn’t work, one more possibility is due to the encoding type of the file. Open your file with the error in Notepad++, and change its encoding type to UTF-8. Now refresh and check again the login page, it will work fine. In some cases, the issue may be due to plugins and renaming the plugins will work.
Thus, the above solutions can help to solve the WP login Error ‘Cookies are blocked due to Unexpected Output’. For more information, follow us on Twitter and Facebook and For video tutorials, subscribe to our YouTube channel ServerCake India.