1

I am facing following error in wordpress.

        Warning: Cannot modify header information - headers already sent by (output
         started at /home/******/public_html/******/demo/awani/wp-
    content/themes/*********/functions.php:1) in /home/*******/public_html
/**********/demo/*********/wp-includes/pluggable.php on line 1210

I have searched about it and find solution that i have to remove extra space from functions.php after <?php tag. I did but it does not working. Also at line one there is nothing except <?php

I also remove all the code from functions.php and upload the blank file for just testing purpose but still showing the same error.

Can someone kindly guide me how to fix this issue. I would like to appreciate.

Muiz Ahmed
  • 61
  • 6
  • Possible duplicate of [How to fix "Headers already sent" error in PHP](https://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php) – Jens Sep 05 '17 at 06:47

2 Answers2

1

Go to your /wp-includes/pluggable.php and put below code on just after php tag.

ob_start();

It will resolve your issue.

Akshay Shah
  • 3,391
  • 2
  • 20
  • 33
  • It is working but i want to know if i use it then there will be any issue ? – Muiz Ahmed Sep 05 '17 at 07:00
  • There wouldn't be any issue it is may be due to bad practice of coding or some time plugins are not developed properly due to that it will happen. hope i give your correct answer and get the reward here. :) – Akshay Shah Sep 05 '17 at 07:02
0

I think there is whitespace in your functions.php please remove it and check if you update your wordpress /wp-includes/pluggable.php it wont be the same

I had same problem and there was space <?php just remove that space

sagar
  • 590
  • 4
  • 11