WordPress Warning: Cannot modify header information – headers already sent by

WordPress Warning: Cannot modify header information - headers already sent by ... is a WordPress error message that is terrifying as it means you can not login to the WordPress Admin to rectify the situation. If you do not know how to use FTP software then this is obviously a massive problem.

WordPress Warning: Cannot modify header information - headers already sent by

The issue can be caused by a number of issues but the solution is fairly simple. The WordPress "Warning: Cannot modify header information - headers already sent by" error message is usually due to some rogue spaces or extra lines appearing in one of your WP php files. The WordPress Warning message tells you which file and the exact location of the naughty unwanted guests.

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\wordpress\wp-config.php:1) in C:\xampp\htdocs\wordpress\wp-admin\install.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/fitness/public_html/wp-includes/class.wp-scripts.php:123) in /home/fitness/public_html/wp-includes/classes.php on line 1586

Warning: Cannot modify header information - headers already sent by (output started at /homepages/39/d284713208/htdocs/llnwheeling/wp-content/plugins/feedwordpress/feedwordpress.php:1) in /homepages/39/d284713208/htdocs/llnwheeling/wp-includes/option.php on line 563

WordPress "Warning: Cannot modify header information"

The WP "Warning Cannot modify header information" and error is found in the first php file mentioned and the :number is the line where the php code error is located. Using your FTP download the php file and then copy it so you still have the original to hand. This is a 'best practice' that you should do with all files.

Warning: Cannot modify header information - headers already sent by WordPress error message

The starting WordPress FAQ on the How do I solve the Headers already sent warning problem will help you to solve the issue. We have found that ...

It is usually because there are spaces, new lines, or other stuff before an opening tag (< ? php) or after a closing tag (? >), typically in wp-config.php.

The php code above in the brackets is not visually correct as it will not display properly, the chacracters in the brackets should be together.

Make the changes (delete any lines and spaces so the code is all in one line then press return so you know there are no hidden lines), then upload the new saved file by FTP. Hopefully when you refresh your WordPress login page it will now work.

If it does not then you can always ask for help on the WordPress forum and the kind folk there will soon quickly help you.