Headers already sent by (output started at /pathtotheme/functions.php:6)

If you get the following error when making changes to your wordpress theme, there’s a good chance you’ve got whitespace in your functions.php file.

“Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/wp-content/themes/themename/functions.php:6) in /home/username/public_html/wp-includes/pluggable.php on line 390″

The number after “functions.php:” indicates the line in the file which is faulty, if you have empty lines at the end of the file, remove them and you should be back up and running.

One thought on “Headers already sent by (output started at /pathtotheme/functions.php:6)

  1. Pingback: Richy’s Random Ramblings / PHP: Avoiding “Headers already sent by…” errors

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>