Cannot modify header information

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

Most common source of error

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".

Further error source

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".

Was this article helpful?

Thank you very much for your review!

Thank you very much for your review!

You have already rated this item.

Thank you for your time.

Do you require assistance?

Support

Telephone support

Domains worldwide

Europe

  • .at
  • .ch
  • .de
  • .eu
  • .fr
  • .it
  • .nl
  • .uk
  • .es
  • .pl
  • .me
  • .li

Asia

  • .ae
  • .cn
  • .hk
  • .in
  • .io
  • .jp
  • .my
  • .la
  • .sg
  • .tw
  • .ps

Generic

  • .biz
  • .com
  • .info
  • .mobi
  • .net
  • .org
  • .travel
  • .xxx
  • .pro
  • .jobs
  • .name
  • .aero

New domain extensions

  • .online
  • .sale
  • .reise
  • .hotel
  • .xyz
  • .ruhr
  • .restaurant
  • .coupon
  • .video
  • .bayern
  • .berlin
  • .hamburg
  • .koeln
  • .london
  • .reisen
  • .saarland
  • .wien
  • .bio
  • .business
  • .events
  • .haus
  • .immo
  • .immobilien
  • .international
  • .versicherung

Companies that trust us

Other products you might be interested in

Webhosting
Concentrate fully on your project! Performance and security included.
Rankingoach
Optimize your Web site and achieve top rankings.
Website optimization
SSL Certificates
For your site, more safety protect yourself from hacker attacks.
Quickly protect