c-outlet
By:
c-outlet

Warning: Cannot modify header information - headers already sent by (output started at /var/www/wp-content/themes/Lamoon/includes/shortcodes/shortcodes.php:1) in /var/www/wp-includes/pluggable.php on line 1121

August 5, 2014 7.5k views

I just wanna ask a question, maybe someone of you already had the same problem. I was working and everything was perfect, and suddenly i got this..

Warning: Cannot modify header information - headers already sent by (output started at /var/www/wp-content/themes/Lamoon/includes/shortcodes/shortcodes.php:1) in /var/www/wp-includes/pluggable.php on line 1121

3 Answers

This is a somewhat common PHP issue. You should check that file for trailing spaces, just make sure there's no extra chars after the php closing tag: ?>

If that's not the case, there might be some logic issue wich can only be addressed by evaluating the code. Also, on a production server you might wanna just turn off warnings and notices adding the following line:

error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);

Hope it helps...

My friend has always the same error after they installed the Hungarian version of WordPress. As I know all problems were solved after reinstalling that, but the original, English version.

@c-outlet I suggest opening the file /var/www/wp-content/themes/Lamoon/includes/shortcodes/shortcodes.php in a text editor (nano or vim) and checking if the first line is empty.

Any whitespaces/newlines before the <?php tag can cause this error.

Moreover since this is an issue with a premium theme you can ask them directly.

Have another answer? Share your knowledge.