Title: Single template file vs calling header.php/footer.php etc separately?
Last modified: August 19, 2016

---

# Single template file vs calling header.php/footer.php etc separately?

 *  [wohoo](https://wordpress.org/support/users/wohoo/)
 * (@wohoo)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/single-template-file-vs-calling-headerphpfooterphp-etc-separately/)
 * Hey all. Going to ask this here too as no one has been able to respond in the
   themes section.
 * I have what may be a no-brainer.
 * By default, the way WP themes are built is that there are separate header.php,
   sidebar.php, comments.php, footer.php etc files in a theme. And for good reason
   for lots of people.
 * However, does putting them all into one file and not loading them separately 
   cause less stress on the webserver, as it them loads a single *.php file instead
   of 4-5 smaller every time a user visits a new page?
 * Less queries, less stress?
 * I may have totally misunderstood how this affects the under-the-hood of things,
   so wanted to asks someone who’s smarter at this than me.
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/single-template-file-vs-calling-headerphpfooterphp-etc-separately/#post-1894491)
 * All includes are done on the server—essentially, PHP is copying and pasting the
   template files for you. It really doesn’t require much processing power. The 
   reason that there’s a general recommendation to reduce the number of HTTP requests
   is because of the typical latency involved with each one. A remote call is generally
   much slower than a local one. Unless you’re storing your included template files
   on a remote server (which you probably aren’t) you will see virtually no benefit
   to inlining the code. If you want to reduce load, look into minifying and merging
   your JavaScript and CSS files.

Viewing 1 replies (of 1 total)

The topic ‘Single template file vs calling header.php/footer.php etc separately?’
is closed to new replies.

## Tags

 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/single-template-file-vs-calling-headerphpfooterphp-etc-separately/#post-1894491)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
