• Will WordPress overwrite the root level file wp-blog-header.php on update (or any of the root level files for that matter)?

    I’m trying to modify the PHP headers being sent, but get a “headers already sent” error when attempting this from within the theme files.

    Thanks for any info!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jbarryweb

    (@jbarryweb)

    Ended up not needing to modify PHP headers after I discovered the built-in “template_redirect” action.

    I am still curious though if/what root level files get overwritten when WordPress is updated from the admin interface?

    I’m glad that you found yor answer! I’d alwys recommend using hooks and actions to achive something like this.

    To answer your question, when you’re updating the core system, every file will get updated, so any changes you’ve made to core files will be over-written with the new file. I haven’t checked completely, but I believe that core updates won’t delete any extra files that are there, just over-write all of the ones from the updaed version.

    Themes and plugins are a little different as they delete the entire folder ad re-install it from the update ZIP file, so themes and plugins shouldn’t create any new files inside their respective folders as they will all be deleted on the next update.

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

The topic ‘Should I Modify wp-blog-header.php?’ is closed to new replies.