Warning: Cannot modify header information – headers already sent by

Are you looking for the solution to the wordpress error that looks like this,

Warning: Cannot modify header information – headers already sent by (output started at C:\Xampp\xampplite\htdocs\TestBlog\wp-content\themes\bluetheme2\functions.php:47) in C:\Xampp\xampplite\htdocs\TestBlog\wp-includes\pluggable.php on line 391

I can help you solve this. Here’s how. 

This error occurs when there’s extra white space before the <?php code and after the last ?> in your php files.

Here’s an example of an extra space before the <?php code. (Line # 1)

White Space before line 2

and here’s an example of an extra space after the last ?> code. (Line # 26)

White space after line 25

Easy Solution:

  1. Go to the file that is mentioned by the error. It’s the file after the words, “output started at“.
  2. Just delete the extra space and the problem is solved. ^_^

If you have any questions, just leave a comment. Enjoy! 🙂

Leave a Reply