Most often we are trapped at WordPress with a plethora of errors and mind you they all pop up just because of us making some change in a file or some plugin making some change. A point in case here is an error at WordPress that one may experience often (not that often though
.
Warning: Cannot modify header information - headers already sent by (output started at /home/.../wp-setting.php:3) in /home/.../wp-login.php on line 314
This is commonly referred as “White Space Problem”. Note that file name and line number may vary and the path too. But the error indicates itself that where is the problem. The error, here is that php code is now coupled with an empty space before or after with blanks (spaces) and/or empty lines at the beginning or end of a file when you edited it or some plugin or your command from SSH has tried to edit a php file. This empty or whitespace is then sent to the browser when the file is loaded and interferes with the header of a page often causing problems with login at wp-admin or wp-login.
How to fix “Warning: Cannot modify header information – headers already sent by…”:
- Carefully look at the file which you have to fix. This is told by the error itself. See within the brackets. (output started at /home/.../wp-setting.php:3). It means error is at line number 3 in wp-setting.php.
- Now, edit wp-setting.php or whatever is the file mentioned in the brackets in your error. I always edit it via CuteFTP. You can use any of your program or host provided interface.
- Remove all blank spaces before “<?php” and after “?>” whatever is the case.
- Save your PHP and upload it again.
- Hey, you have fixed it! Send us a comment if you really did
Tell us if it worked for you??
Related Articles:
- WordPress Fatal error: Cannot redeclare wp_load_image() (previously declared in…
- iPad 2 Production has been Started
- How To Add Favicon In WordPress Coding
- Top WordPress Plugins of 2011
- How to add Statpress Plugin (Daniele Lippi) in WordPress Blog
- WordPress Fatal error: Call to undefined function _deep_replace()…pluggable.php on line 884




{ 9 comments… read them below or add one }
didn’t work.
Error is
Warning: Cannot modify header information – headers already sent by (output started at /home/fleming/public_html/agakhan2/wp-content/themes/thesis_17/custom/custom_functions.php:1) in /home/fleming/public_html/agakhan2/wp-includes/pluggable.php on line 868
the custom_functions.php file has only 250 lines. The pluggable.php has something to do with headers on line 868 but no blank lines. Line 868 is
header(“Location: $location”, true, $status);
neither has blank space before <?php
The error was in ‘custom_functions.php
line 1.
I thought I had a similar error until I reread the tips. File path and line error is in parens.
It did not work for me either but I did find a way to avoid the bug by not calling the header function. I made a javascipt call instead:
$url = get_permalink();
$location = “window.location=’” . $url . “‘”;
echo $location;
Works for me thanks
It worked! Thanks
Worked like a charm! Thx!
this post is very helpful to me….
Thanks, Nailed it… second time. Nut until I installed my theme, tried to trouble shoot some plug-ins. Remade my child theme and then made the same error in the functions.php file with a few extra spaces. Aargh.
Thanks for the help. Excellent details.
Thanks! I’ve been getting those errors in a couple of little websites. Now I know what the heck is going on and have written on it also