Title: warning: cannot modify header information
Last modified: November 2, 2017

---

# warning: cannot modify header information

 *  [camanicnack](https://wordpress.org/support/users/camanicnack/)
 * (@camanicnack)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-185/)
 * I am receiving an error message of “WARNING: CANNOT MODIFY HEADER INFORMATION–
   HEADERS ALREADY SENT BY (OUTPUT STARTED AT” through out my wordpress website 
   each time I use the php code within my page templates of header(‘location:’),
   example header(‘Location: [http://demo.camavision.com/VCSWeb/&#8217](http://demo.camavision.com/VCSWeb/&#8217);).
   This code was working fine awhile ago, about a week ago to be exact. I tried 
   shutting off all the plugins, updating the wordpress main source code, even tried
   going into the source code and fixing it but it just seems that a different line
   with same message of modify headers pops up… And another one… And another one…
   and etc. Getting WARNING: CANNOT MODIFY HEADER INFORMATION on multiple lines 
   of the base code. As an example: “WARNING: CANNOT MODIFY HEADER INFORMATION –
   HEADERS ALREADY SENT BY (OUTPUT STARTED AT C:\WAMP64\WWW\VCSWEB\WP-INCLUDES\FORMATTING.
   PHP:5084)” Basically too many to fix for the source code, and all I do is just
   add a php code of header(‘Location: [http://demo.camavision.com/VCSWeb/&#8217](http://demo.camavision.com/VCSWeb/&#8217);)
   in the template. It all comes down that the main source code from wordpress seems
   to either have a bunch of spaces or something wrong with the php <?php & ?> coding.
   Please fix….
    -  This topic was modified 8 years, 6 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
    -  This topic was modified 8 years, 6 months ago by [camanicnack](https://wordpress.org/support/users/camanicnack/).
    -  This topic was modified 8 years, 6 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-cannot-modify-header-information-185%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 6 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-185/#post-9645461)
 * An awful lot of the cases of this message have to do with either some characters
   before the opening `<?php` in a file like functions.php or a template file or
   a closing `?>` with some characters after it. A good practice is to make sure
   that first `<?php` is on a line all by itself and do not end .php files with `?
   >`.
 * That said….
 * This may be a plugin or theme thing. Please attempt to disable all plugins, and
   use one of the default (Twenty*) themes. If the problem goes away, enable them
   one by one to identify the source of your troubles.

Viewing 1 replies (of 1 total)

The topic ‘warning: cannot modify header information’ is closed to new replies.

## Tags

 * [Cannot modify header information](https://wordpress.org/support/topic-tag/cannot-modify-header-information/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-185/#post-9645461)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
