WordPress 3 error: Warning: Cannot modify header information

This error message has the ability to drive some developers completely insane. However, the solution to this error is A LOT easier than you think.

The error:

Wordpress 3 error - Cannot modify header information

What to do

  • Identify the file where the error originates from. This is stated in the actual error. In this case it is “functions.php”, not “theme-editor.php”
  • Remove the white spaces before the “<?php” or “<?” tags as well as after the “?>” tag.

Believe it or not, you are done. Easy as pie.

About the Author:

Nick is the owner of Code Cabin, founder of PingPong and co-founder of AirWeddings. He has an extensive history in programming and digital marketing and has worked on some of the largest online websites in South Africa. Nick shares his knowledge and insight on his personal blog, nickduncan.co.za.

NickDuncan – who has written posts on Nick Duncan.


Email • Google + • Twitter

Tags: , , ,

2 Responses to “WordPress 3 error: Warning: Cannot modify header information”

  1. Phillip GibbNo Gravatar July 13, 2010 at 4:09 pm #

    yeah, I have come across that before, crazy – and even worse; in a plugin

  2. AntonRSANo Gravatar July 22, 2010 at 11:46 am #

    That error was driving me crazy when I first started PHP.  It’s quite a common error

Leave a Reply