WordPress Troubleshooting

[Troubleshooting] PHP Warning: Cannot modify header information – headers already sent

Sometimes we experience such error message, which shows up on header area of WordPress site, or generates blank screen.

PHP Warning:  Cannot modify header information - headers already sent by (output started at /public_html/.../wp-content/themes/.../functions.php:1) in /.../wp-includes/option.php on line 563


In this case, functions.php file is the cause, it might be others in other cases.

To solve this problem, I just opened functions.php file with Notepad++ ,

  1. Firstly, make sure there is no space before opening PHP tag  <?php  or after closing PHP tag  ?> (If there is closing tag) , if space exists, eliminate it.
  2. Secondly, under Encoding, convert it to ANSI
  3. Save the file.

That’s it!

[Troubleshooting] PHP Warning:  Cannot modify header information - headers already sent

Leave a Reply

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