Concatenate the template files into less php files ?
-
Hello,
Do you know if it is possible to reduce the number of php files that make one’s template work, concatenate them, in order to reduce the number of server hits ?
For instance have index.php and sidebar.php merged into one ?
Or have header.php and footer.php not as an independant files, but being a part of index.php ?Technically, I suppose I could replace a require() with the simple php code for the footer/header/sidebar, but I have no idea if it would work, or if it would cause problems.
I’d be grateful if you can give me your opinion ??
In case you wonder why I’m asking that weird question, here’s the explanation.
I have a blog with many visitors (almost 35k unique visitors per day for 135k pages seen), hosted on a mutualized host. For 8$/month that host is extraordinary I think, no downtimes, no issues, very fast for both the database and the files, even with 35 000 visitors per day. For a server holding such traffic on a wordpress platform, most usually I should be paying much more. But there’s one limitation, one, that is horribly annoying : the server counts the number of hits your website generates, and it is limited to 400k hits per day.
I’m already hosting all non-core files (even the smileys) elsewhere, but I still make 10 hits per unique visitor. If I can concatenate my template files, I could avoid a minimum of 3 hits per visitor, which would be enough to sustain more traffic growth in the future.
That’s for the reason behind my question ??
- The topic ‘Concatenate the template files into less php files ?’ is closed to new replies.