Title: Warning: Cannot modify header information
Last modified: August 21, 2016

---

# Warning: Cannot modify header information

 *  Resolved [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/)
 * Hi, i have different problem now. I don’t know what it causes, but everytime 
   when i edit my posts and for example change the category and then click “Update”
   i got this message:
 * **Warning: **Cannot modify header information – headers already sent by (output
   started at /data/web/virtuals/22236/virtual/www/subdom/wp-test-2/wp-content/themes/
   wp-test-2/functions.php:1) in /data/web/virtuals/22236/virtual/www/subdom/wp-
   test-2/wp-includes/pluggable.php on line 876
 * When i go back to previos page the changes are ok, category have changed and 
   it works fine. But i don’t want this message :-).
 * I’ve looked to pluggable.php on line 876, where is:
 * `header("Location: $location", true, $status);`
 * and i don’t see anything wrong in it.
 * Some other informations:
    – I’m making my own template from scratch – I don’t
   use any plug-in right now (except Akismet, Hello Dolly and Meta Slider – but 
   i tried to deactivate it – nothing changes) – I also look at my functions.php–
   i have no blank rows or spaces befor or after my <?php ?> – It must be something
   in my custom teplate, becouse when i change template, it works fine – I even 
   try to empty my functions.php file and it still don’t work, even if i have nothing
   at line 1 – But it have to do something with functions.php, becouse when i delete
   it completly from my template directory, update button works fine without warning!
 * This is what i have in my functions.php:
 *     ```
       <?php
   
       // functions
   
       if ( function_exists('register_sidebar') ) {
   
          register_sidebar(array(
          'name' => 'sidebar 1',
          'before_widget' => '<div id="%1$s" class="widget %2$s">',
          'after_widget' => '</div>',
          'before_title' => '<h2>',
          'after_title' => '</h2>'
           ));
   
          register_sidebar(array(
          'name' => 'sidebar 2',
          'before_widget' => '<div id="%1$s" class="widget %2$s">',
          'after_widget' => '</div>',
          'before_title' => '<h2>',
          'after_title' => '</h2>'
          ));
   
          register_sidebar(array(
          'name' => 'sidebar-right',
          'before_widget' => '<div id="%1$s" class="widget %2$s">',
          'after_widget' => '</div>',
          'before_title' => '<h2>',
          'after_title' => '</h2>'
          ));}
       ```
   
 * But i think it is not important – just existence of functions.php causes it –
   even if i have empty functions.php file in template directory. When i get rid
   of it, everything works fine. But i need that file, of course 🙂
 * It is not criticall, becouse everything works fine, post is updated, but i have
   still this message.
 * Thanx for help and sorry for my bad english 🙂

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781479)
 * The issue is in your theme’s functions.php file. Try reviewing [Solving “headers already sent” warnings](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F).
 *  Thread Starter [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781483)
 * esmi, thanx, but did you read everything I wrote?? there are NO spaces in my 
   function.php. I even try to empty it completly with nothing in it. Still same
   issue.
 * I already tried to delete all my WP files except my theme and upload new one –
   it didn’t solve the problem.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781484)
 * > did you read everything I wrote?
 * Yes. Did you read the page at the link I posted above?
 *  Thread Starter [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781490)
 * How can i have empty spaces in document, where is nothing? Becouse i tried to
   empty the file completly and it still does it. Yes, i did – i read it before 
   you post it. I thing i’ve tried every common advice on this topic. I tried finde
   empty spaces, i tried unistall plugins, i tried empty functions.php, i tried 
   upload new fresh WP files… nothing helps. Only if i change my template or get
   rid of functions.php the Warning stops comming.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781495)
 * > Just because you cannot see anything does not mean that PHP sees the same.
 * _From [Solving “headers already sent” warnings](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)_
 * As I said, you need to actually read that page.
 *  Thread Starter [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781497)
 * I’ve done it the way that is describe there. In my function.php and in my pluggable.
   php.
 * >  1.Place the cursor between the ? and >
   >  2.Now press the DELETE key on your
   > computer Note to MAC users: The “DELETE” key on a PC deletes characters to 
   > the right of the cursor. That is the key noted here. 3.Keep that key pressed
   > For at least 15 seconds 4.Now type > and 5.save without pressing any other 
   > key at all. 6.If you press another key, you will bring the problem back. DO
   > NOT PUT CODE IN UNNECESSARY CODE BLOCKS, PUT THEM IN A SINGLE PHP BLOCK.
 *  Thread Starter [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781500)
 * As I said – i actually read that page and i actually do everything it says …
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781503)
 * Then there is nothing else we can do to help. The issue is clearly in your theme’s
   functions.php file and this was confirmed when you removed that file.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781505)
 * And do not touch any WordPress core files. The issue is NOT in pluggable.php 
   as the error message clearly demonstrates
 *  Thread Starter [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781506)
 * But i don’t think that is it – becouse even if i upload function.php from default
   template in to it it do the same Warning message. But if i change templat to 
   default, it works. So… i really don’t know.
 *  Thread Starter [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781510)
 * Thanx anyway …
 *  Thread Starter [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * (@jabbo126)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781527)
 * I’ve solved it. I don’t know how, but really ther MUST be some spaces, even if
   i deleting like mad, hold del.(at end) and backspace(at front) for abou 30 seconds
   and then Save as without keyboard. Nothing helps. Then i just upload different
   functions.php from one tutorial i was making and voala … it works. So i just 
   copy/pase my functions without <?php ?> – and put it into tahat working file.
   Suddenly it works. I still don’t understand it completly, becouse i’ve tried 
   to upload different functions.php from another theme and it doesn’t work. Now
   it is. Im glad, but still little bit nervous about this issue. Is really wierd…

Viewing 12 replies - 1 through 12 (of 12 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/)
 * [message](https://wordpress.org/support/topic-tag/message/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 2 participants
 * Last reply from: [jabbo126](https://wordpress.org/support/users/jabbo126/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/warning-cannot-modify-header-information-108/#post-3781527)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
