The “Cannot modify header information…” Wordpress Error
By Chad A. Johnson · July 27, 2009
You are working away at building your Wordpress website. Having fun finding plugins to add exciting new functionality to your site when error messages start appearing at the top of the Wordpress admin.
The error message starts with (1) “Warning: Cannot modify header information – headers already sent by…”, followed by (2) a reference to a plugin file and (3) a reference to “pluggable.php on line 850”.

This error can seem like a bunch of gibberish, but once you know what you are looking for, it is quite easy to fix.
What has happened is that a PHP file in a plugin folder has picked up an extra line or two after the closing PHP tag. Sounds complex, but it isn’t.
Basically, Wordpress doesn’t want to see any extra lines after the “?>”. The page should end immediately afterward. Doesn’t seem like a big detail, but coding is about little details.
Section (2) in the above diagram tells you the plugin with the frivolous carriage returns.
You will recognize the “/wp-content/plugins/” as the folder that you uploaded your plugins into. After that is the name of the plugin folder with the corrupt file. In this example, it is WP-Print (an excellent way to add printer friendly pages to your website).
The easiest fix is to download a fresh copy of the plugin and replace it for the old folder.
If you have customized the plugin, replacing the entire folder may mean losing your modifications. In that case:
If you enjoyed this post, make sure you subscribe to our RSS feed!If you want an avatar or to include your social profiles join our Facebook community. You can also edit your profile and add your favorite networks.
Thanks Chad! I’ve been getting those errors in a couple of little websites I have. Now I know what the heck is going on.
Just wanted to say thank you. Can’t believe something so simple could cause so much grief!