In this tutorial, you will learn how to fix the "Cannot modify header information" error in Wordpress.
A warning similar to the following will appear:
Cannot modify header information - headers already sent by (output started at /home/ftplogin/***/wp-config.php:1) in /home/ftplogin/***/wp-config.php on line 50
A byte order mark (BOM) at the beginning of the file wp-config.php. It has been edited with an unsuitable editor. However, any other file that is executed before the session can also be used. Finding the BOM is particularly problematic because it is a defined marker byte and is not shown either in the editor or in the browser. Except in a hex editor it is not visible.
If a BOM appears in a page content, it can lead to blank lines or unexpected characters (ï "¿) on web pages or in editors. Therefore, it is best to omit the BOM in UTF-8 encoded content if you have the option.
A detailed explanation of Byte Order Mark (BOM) can be found here.
Windows Notepad, for example, is unsuitable for editing UTF-8 files for the web, because it inserts the BOM unsolicited, even if the open file did not have a BOM before.
A suitable editor is e.g. Notepad++. Here you can convert the file to "UTF-8 without BOM".
The executed file contains a space or line break outside of "< ?php" and "? >" or "< ?php" is completely missing.
This error is fast and easy to find. Just delete the line break or the space or enter the missing "< ?php".
Send an email
Telephone support