Home / Questions / What does headers already sent mean in WordPress?
What does headers already sent mean in WordPress?
The headers already sent error means PHP printed text before WordPress could set headers. The error names the file, and a stray space or echo in it is the usual cause.
The message “Cannot modify header information” with “headers already sent by” means a file sent output to the browser too early. WordPress needs to set headers before any output is sent.
Find and fix the file
- Read the file and line number in the error. It points to the place where the output started.
- Remove blank lines or spaces before the opening PHP tag, or after the closing tag, in that file.
- Remove stray
echoorprintstatements that run too early.
If the file is a plugin or theme file, reinstall that plugin or theme from a clean copy. If it is a WordPress core file, replace it with a fresh copy.
For more help, see our guide to common WordPress errors.
Ready to act on this?
Get a written review of your site, or send us your question and we will reply within 24 hours.
Related services
Related questions
Not sure where your site stands?
Send us the details and we will reply within 24 hours with a clear next step.