We have run into quite a few people lately getting this error on their WordPress installation, so we figured we’d post the solution here as a quick fix for anyone else having similar issues.
The error will appear something like this:
Warning: Cannot modify header information – headers already sent by (output started at //home/wordpress/wp-config.php:1) in /home/wordpress/wp-includes/pluggable.php on line xx
Of course the locations of the files listed in the warning will vary based upon your installation.
The likely culprit, believe it or not, are spaces. Most likely while making some modifications to your store you inadvertantly left in a space either before the beginning
< ?php tag, or after the last/terminating
?> tag within the page.
< ?phptag, and if there are any spaces before it, delete them.
?>tag (not all do), make sure any spaces after that are deleted.
Thats it! In 99% of cases this should fix your "cannot modify header information" errors within WordPress.