Title: Plugin to prevent WordPress from setting page headers?
Last modified: August 19, 2016

---

# Plugin to prevent WordPress from setting page headers?

 *  [besson3c](https://wordpress.org/support/users/besson3c/)
 * (@besson3c)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-to-prevent-wordpress-from-setting-page-headers/)
 * Hello,
 * I’m using WordPress inside of a CodeIgniter framework, and therefore I don’t 
   want WordPress to be setting page headers – I’d rather CodeIgniter handle this.
 * In the status_header function in wp-includes/functions.php I’ve included this
   silly little shim:
 * function status_header( $header ) {
    if (file_exists($_SERVER[‘DOCUMENT_ROOT’].“/
   system”)) { // CodeIgniter site, WordPress should not set headers return; } …
 * This aborts the function when the CodeIgniter “system” directory is found. I 
   might toy around with this and come up with a better way to detect a CI site –
   perhaps a global variable/constant or something, but if I wanted to create a 
   little plugin to do this so that I don’t have to alter the WordPress code after
   each release, would this be easy to do? Does the plug-in architecture support
   such a hack? WIth a plug-in the detection mechanism would simply be “if the plugin
   is enabled, abort this function”.
 * Can anybody suggest the best way to go about doing this if not a plug-in, or 
   suggest a more elegant way to go about doing this if such a way exists?
 * Thanks in advance!

The topic ‘Plugin to prevent WordPress from setting page headers?’ is closed to 
new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [besson3c](https://wordpress.org/support/users/besson3c/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-to-prevent-wordpress-from-setting-page-headers/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
