Headers already sent …

if you get something like:

Warning: session_start(): Cannot start session when headers already sent in [site-path]/wp-content/plugins/wppizza[xyz]/[some-file] on line [some-line]
Warning: cannot modify header information - headers already sent by [site-path]/[some-dicetory]/[some-file] on line [some-line]

The problem is that either:

  • – php notices/warnings/errors etc are output to the site instead of being logged
  • another plugin – or your theme/child theme – is outputting content where it should not.

Although the session start warning references a wppizza file, this is *not* in fact a wppizza error/fault (as confusing as this might seem, admittedly) but it points to some other file or plugin outputting content before it should do.
If it’s a “cannot modify header information – headers already sent by” instead, it typically also tells some file and line number.

First of all


  • – make sure you do not output any warnings etc by setting your debug like so or even disabling debug altogether if that’s acceptable in your scenario (wppizza does it’s best to ignore those, but has no influence over other plugins of course)
  • – once you have done so, check your site again (clear you browser cache) as this might be all you need to do to make it all work again. Fix other error/notices/warnings at your leaisure

Then – if you are still having session related issues


  • – disable all other *non*-wppizza plugins and switch to a wordpress default theme (twenty-xyz) , at least temporarily.
  • – assuming disabling everything non-wppizza related solves the issue, re-enable your plugins/themes one by one, until it does not work again (so you know what is causing it)
  • – fix the issue following the suggestions/guide/answer here or better still, contact the theme/plugin author to fix it.
  • – in the event that the above does still not solve your problem, contact me , making sure to send me relevant info (debug.log, url , version numbers etc ) via the usual channels (contact/email/forums)

PS | FYI: Wppizza uses native php sessions – extensively – that simply will not work if other scripts/plugins/themes output content where they should not.