0

I am getting below error on my website :

Warning: Cannot modify header information - headers already sent by (output started at /XXXXX/public_html/index.php:1) in /XXXXX/public_html/wp-includes/pluggable.php on line 1121

I have checked wp-config.php file's PHP open and end tag is proper without space. As well as functions.php file is fine.

Please help me in this issue.

Thanks in advance.

Hardik
  • 1,429
  • 2
  • 19
  • 37
  • Try using the search http://bit.ly/ZPDqvr its answered many times already http://stackoverflow.com/search?q=Warning%3A+Cannot+modify+header+information+-+headers+already+sent+by – Dave Feb 02 '15 at 13:14
  • 1
    Recheck all modifications that were made to the site since it was last working. One of the modifications is producing output (an error, an echo statement, etc) when it shouldn't be doing so. – George Cummins Feb 02 '15 at 13:15
  • 1
    possible duplicate of [How to fix "Headers already sent" error in PHP](http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php) – Dave Feb 02 '15 at 13:15
  • I m thinking why it shows that error in index.php but I have not done anything in index.php file – Hardik Feb 02 '15 at 13:17
  • I have also tried by putting ob_start(); and ob_flush(); in config.php as well as function.php file. But didn't worked for me. – Hardik Feb 02 '15 at 13:19
  • index.php uses several other scripts to create the site. You need to check modifications to _all_ of them, or at the very least, to all of them that have the potential to be called from index.php. – George Cummins Feb 02 '15 at 13:36

1 Answers1

0

Make sure you don't have any redirect or wp_redirect methods called in your code(in all your theme's files). If you have them, Move them above all HTML tags if possible. That should fix them.

Shahul Hameed
  • 93
  • 1
  • 7