You may receive the following error after successful installation or migration of your WordPress blog:
Warning: Cannot modify header information – headers already sent by (output started at /home/user/public_html/wp-config.php:1) in /home/user/public_html/wp-includes/pluggable.php on line 865
In the above, the culprit is not pluggable.php file but it is wp-config.php. You are receiving this warning message because there are spaces, new lines, or other stuff before an opening <?php tag or after a closing ?> tag in wp-config.php. To resolve this problem, rename your existing wp-config.php file and recreate a blank wp-config.php file using clear text editor i.e. Windows notepad, notepad++ etc. Do NOT use Wordpad or similar editor. Copy all contents from your old wp-config.php file to your editor and save the new wp-config.php file. This should resolve the problem.
The above is an example warning message. Following are some similar warning message and you can resolve using the above method:
Warning: Cannot modify header information – headers already sent by (output started at /home/user/public_html/wp-login.php:1) in //home/user/public_html/wp-login.php on line 362
Warning: Cannot modify header information – headers already sent by (output started at /home/user/public_html/functions.php:6) in /home/user/public_html/wp-includes/pluggable.php on line 865
The culprit of the above warning messages is the file mentioned in “output started at”. You will need to recreate problematic file using clear text editor with same contents and it should resolve most of the issue.