The page shows a warning like "Cannot modify header information - headers already sent by (output started at /wp-content/themes/yours/functions.php:42)", and often the login or a redirect stops working with it. Before WordPress can send a redirect or a login cookie, nothing may have been printed to the page. Some file printed something first: usually a blank line, a space or an invisible byte-order mark before <?php or after a closing ?>. The message tells you exactly where: the part in brackets after "output started at" is the file and line to fix, not the file the warning is "in".
pluggable.php or wp-login.php) is only where WordPress noticed, and is almost never the one to change.functions.php or wp-config.php, or a snippet pasted from a website, is the usual source. A space or empty line before the first <?php, or after a final ?>, is enough.wp-content/plugins/ means that plugin printed something early, often right after an update. Its name is the folder after plugins/.<?php is the first thing in the file, with nothing before it. At the very end, delete a closing ?> and any blank lines after it; WordPress files do not need one.wp-content/plugins/ (add -off), check the site works, then update or replace that plugin before turning it back on.wp-config.php set define('WP_DEBUG_DISPLAY', false); and fix the warning itself when you can.| What you see | What it means | Usual fix |
|---|---|---|
| "output started at .../functions.php:1" | Something before <?php: a space or a byte-order mark | Delete it, or re-save as UTF-8 without BOM |
| "output started at" the last line of a file | Blank lines after a closing ?> | Delete the closing tag and what follows |
| "output started at .../wp-config.php" | A pasted line in the config printed text | Remove the stray characters at the top or bottom |
Path under wp-content/plugins/name/ | That plugin prints before WordPress is ready | Turn it off by renaming its folder, then update or replace it |
| Starts after a PHP upgrade, with "Deprecated" lines above | Old code prints warnings on the new PHP | Hide warnings on screen, update the code that warns |
pluggable.php or wp-login.php. They are where WordPress noticed the problem, not the cause, and an update overwrites them anyway.ob_start() to hide the warning. It covers the real fault and makes the next one harder to find.Most of these are one space, one closing tag or one re-save. If the brackets name a file you cannot find or a plugin you need, that is what the box below is for. Related: PHP warnings on the site, login keeps going back to the login page and blank white screen.