Cannot modify header information WordPress
Solved 100 %
Cannot modify header information headers already sent by (output started at wp-includes/pluggable.php
Warning: Cannot modify header information - headers already sent by (output started at/wp-admin/includes/misc.php
Fix Warning: cannot modify header information headers already sent by



:



wp-config

unique codes

:
define('AUTH_KEY

define('SECURE_AUTH_KEY'

define('LOGGED_IN_KEY'

define('NONCE_KEY

define('AUTH_SALT

define('SECURE_AUTH_SALT

define('LOGGED_IN_SALT

define('NONCE_SALT




.

##################################

##################################



:

1-

2- wp-config

3-

" database user prefix "

4-



##################################

##################################

Why you get Cannot modify header information headers already sent by error


Lets take a look at an example of this error so that we can understand it better. The error commonly pops up in the following form:
Warning: Cannot modify header information headers already sent by (output started at /public_html/wp-content/plugins/my-plugin/my-function.php:#) in /public_html/wp-includes/pluggable.php on line #As you can see, there are two files mentioned by the error. The first file (in our case: my-function.php located at /public_html//wp-content/plugins/my-plugin/) is the chief culprit of the error. This is our custom code that is used to override the core functionality provided by WordPress. The core functionality in question is in the pluggable.php file (a core WordPress file which is the same for every WordPress installation). Basically, there is a problem in the first file which is preventing the second file to function properly.
The major cause of this error are blank spaces present in the first file. These could be blank spaces at the top or bottom of the file, unnecessary blank spaces anywhere in the file or even blank spaces between the <?php and ?> PHP tags. In fact, because programmers can (and usually do) mistakenly type extra spaces when writing code, this error is more common than youd expect. The line # indicated in the error message corresponds to where the problem is specifically originating it will help you eradicate it without too much fuss.
Fixing cannot modify header information headers already sent by error

Now that you know what causes this error, you can move on to fixing it for good. We will show you two methods of eliminating this problem, which you can attempt either separately, or in order, if attempting it seperately doesnt work.
Option 1 Editing corrupted files

The first option when troubleshooting the Warning: cannot modify header information error is to manually edit the faulty file. You are already supplied with the necessary information to locate the problem in the error message (remember, its the first file in the message). All you need to do is open up this file, either through an FTP client like FileZilla, or through File Manager.
Essentially, all youre looking to do here is to remove extra spaces present in the file. A good place to start would be the line # mentioned in the error message. From there, you can continue to parse the rest of the file and look for additional unneeded spaces/blanks until the end of the document.
Make sure to pay special attention to the starting and ending PHP tags. There should not be spaces before or after the <?php tag, as well as the ?> tag. Also, the last line of code should not be followed with a blank line or extra space.
In the below screenshot you can see a wp-config.php file which has blank spaces left before opening php tag.
PRO TIP: In many text editors you can remove white spaces automatically. For example, to remove white space in Atom, select all the code and navigate to Packages -> Whitespace -> Remove Trailing Whitespace.
Option 2 Replace corrupted files

Of course, editing multiple corrupted files can be difficult. Files could belong to a plugin or theme you recently incorporated in your site, or could even be a core WordPress file.
If the error is indeed caused by a plugin or theme, all you need to do is re-install it. Doing this fixes the error in most cases. On the other hand, if a core WordPress file is the culprit of the error, your best bet is to get yourself a clean copy of WordPress and replace the corrupted file on your installation with the one present on the clean version. This will ensure that the corrupted file has been restored to its original state while keeping the rest of your WordPress installation intact. Now, simply reboot and make sure that the error is fixed.
Conclusion

Whether you paste a code snippet to your file, insert a new plugin/theme or write code manually, you carry a risk of adding extra blank spaces to the file. These seemingly innocent blank spaces can come back to bite you in the form of the Warning: cannot modify header information headers already sent by WordPress error.