How to rectify the “Cannot Modify Header Information” warning

Kindly follow the below steps to fix the Warning: Cannot Modify Header Information – Header Already Sent By

This PHP header error results from extra empty spaces that are not suppose to be within your files. You could have unknowingly created them when you are modifying WordPress or your Theme files. You will see something similar to the following error message.


You will need to use your FTP program to edit the file on your server.

  1. Use your FTP program to login to your web server.
  2. Navigate to your file, in the example, it’s the wp-config.php.
  3. Open up wp-config.php file.
  4. Look for <?php at the very beginning of the file. Remove any empty space before <?php
  5. The <?php which is the PHP opening tag should be at the very first line of the file within wp-config.php
  6. Look for any ?> sign at the end of the file, it there is any, you will need to remove any empty space after it.
  7. If you cannot find any ?> sign at the end of the file, you will not need to do anything. Just to play safe, you can remove empty lines.
  8. If your error points to functions.php, you can carry out the same procedure.

Error caused by plugin

There is a high chance that it’s coming from a plugin. You can disable all plugins to see if it fixes your issue. If indeed it’s cause by a plugin, you can start finding it by enabling one plugin at a time, and re-loading your website.

After you have found the plugin that’s causing this issue, you will need to disable it and report this issue to the plugin developer.

Disable Include Unicode Signature ( BOM )

Open the file wp-config.php using some editor like DreamWeaver, then navigate to Modify > Page Properties > Title/Encoding > Unchecked the “Include Unicode Signature” > Apply > OK.

Rate This Article

(56 out of 107 people found this article helpful)

Leave A Comment?

This site uses Akismet to reduce spam. Learn how your comment data is processed.