Home > Featured > WordPress: Cannot modify header information – headers already sent warnings
Bookmark and Share

WordPress: Cannot modify header information – headers already sent warnings

Posted on March 22, 2013 | Filed in Featured, PHP, The Web, Wordpress

“Cannot modify header information – headers already sent” warnings are typically due to extra spaces before opening PHP tags and after closing PHP tags.

Try the following to resolve these warnings:
1. Check if you modified wp-config.php. If so, remove all whitespace before the open <?php and after the closing ?> tag.
2. If these warnings appeared after you updated a plugin or added a new plugin, de-activate the plugin. One way to de-activate a plugin is to just move it outside the WordPress plugins folder. You may need to use this strategy if the warnings are also accompanied by errors that prevent the WordPress admin from loading up.
3. One of the clues to the offending plugin will be the path that the warning will display if the warning is due to a plugin.
4. If you’ve tried a bunch of things with no solution and are on a deadline, you can just disable all PHP warnings as a temporary fix.

One of the methods to do so is to add this line to your .htaccess
php_flag display_errors off

How PHP settings can be modified within your hosting environment are dependent on your hosting setup. So there are multiple methods to reach the same objective.

Leave a Reply

Contact Us

Big Apple Design Group
134 West 29th Street
Third Floor
New York, NY 10001

[email protected]

Search Blog