Recently I have move client site from local server to live server and after success deploy site from local lo live server and got an unexpected error on new WordPress websites. It showed blank white page on “wp-admin” and below error on “wp-login.php” page:
“ERROR: Cookies are blocked due to unexpected output. For help, please see this documentation or try the support forums.”
After getting the error fixed, I thought of sharing the solution with all you out there.
Solution of any problem is to understand its reason. The main reason for the above error in WordPress is that one of the active plugins or files like functions.php or any other theme file produces unexpected output, that results in a “headers already sent” warning and consequently preventing WordPress from setting the test cookie on the system.
For fix this issue check your log file(debug.log)
When checking your error log file, check the error logs for the date, you started to get the error. In error messages check if it says anything like: “Cannot modify header information – headers already sent by (output started at”) and then go to file path (file path :in debug log file) check where is the issue. some time due to white space end of the file or closing php (?>) tag causes this issue. remove the white space end of the file and check.
After this refresh your WordPress login page for your website and it will show you the login page without any error. It worked for me; 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.
How does it feel when you have planned so many things for your day, but you could not do them due to an error? An error can spoil your whole day’s plan and it can be even worse when you do not find its solution. Same thing happened to me. There were so many tasks assigned for the day, but got an unexpected error on one of my WordPress websites. It showed blank white page on
Nothing to worry if you faced this error. Access your root folder using ftp client then rename the theme which is using currently & then rename the plugin folder.Now access your http://www.yourdomain.com/wp-admin.Great success no need to look up log error.After that again rename the theme & plugin as before it was…..
try to change your wp-config.php param define(‘WP_DEBUG’, true); to define(‘WP_DEBUG’, false). Then refresh your browser and check the plugins or themes to be modified.
My experience with this issue was that the plugins that’s available in the debug has an empty space before the 1st line <?php.
Modified the plugins mentioned in the debug by removing the space before the <?php and it worked fine.
Hope it helps!
Regards,