Error: Headers already sent, /wp-includes/pluggable.php [WordPress]
So, you’re using WordPress and you just spent hours looking for the perfect theme to fit your new hybrid kitten-and-knitting blog. You upload the theme’s files into the appropriate folder, navigate to the themes page in the administrative interface, and click “activate.” So far, so good, right? Later, you notice that anytime you save a page, post, or option, you’re greeted with an error much like the following:
Warning: Cannot modify header information – headers already sent by (output started at /home/user/public_html/ccc/wp-content/themes/broken-theme/includes/theme-options.php:172) in /home/user/public_html/ccc/wp-includes/pluggable.php on line 237
The exact nature of the error and line numbers will vary. The point is, your frilly new theme is broken or there’s a plugin conflict with it. Here’s a funny thing that happened with my situation and I suspect others may benefit from this tip. If you’re receiving these errors, and you’re still logged into your WordPress admin panel, activate a different theme you know works. The real problem begins if you log out.
If you are unable to access any portion of your site, or most importantly, the log in page, you’re going to need to get your hands dirty.
- FTP into your WordPress themes folder, then to the folder for the offending theme (i.e. wp-content/themes/broken-theme).
- Copy everything within that theme’s folder to another folder on the server, or to your hard drive (or just delete if you plan on installing fresh).
- Copy the files from a known-good theme (like the included “classic” or “default”) into the folder you just emptied.
- You should now be able to access your log in page. (www.yourdomain.com/wp-admin/)
You could just leave it as is and set out to fix or replace your bunk theme, however, I recommend “officially” activating the theme you wish to revert back to, then deleting the duplicate you created in step 3.

August 20th, 2009 at 9:18 am
Most times, when header data is already sent, that means that the page generated some sort of error and did an “echo” unexpectedly. The most likely echo that would occur is a mysql error when a query goes awry.
August 20th, 2009 at 9:23 am
So, what’s the CAUSE? Any clue? Poorly coded themes?
August 20th, 2009 at 2:51 pm
@Neil, from what I read, yes, the problem lies with the theme. Something simple like a misplaced div or a stray end bracket can cause problem. In my case, the theme I was using was a premium theme I purchased and had customized by a professional designer and theme developer. Once I notified him of the problem, he quickly recreated it and patched the issue.
From what I can tell, the problem had something to with calling certain part of the page too soon, above a submit action, instead of after.