Minimize PHP and Database Queries
Why?
Because each time a page on your site loads, if your browser has to execute any PHP queries, it adds to the load time. So, the obvious thing to do to reuce this waste of time is to replace the PHP queries with static HTML. That way, every time a page loads, your browser just reads the HTML instead of having to contact the database.
I have found myself thinking quite a lot about this recently, with making a new theme. Because a theme is for multiple users, you have no choice but to make it do a lot of queries, but if you are happy with your chosen theme, why not take a minute to look through and see what changes you can make.
Here is a typical example:
Often in the header of a theme you will see the following or similar:
<?php bloginfo('name'); ?>
This will mean the site, when loading, will do a database query to find the domain name. To stop this from happening, you simply need to enter the domain name yourself and remove the query. Of course, if you only have a couple you will not notice much in terms of gained speed on your site, but if there are many – and that is more often than not, the case with many themes – then making these changes will make a significant difference.
Related Posts:
Uptime – Downtime – September 2010
Tell me and I'll forget; show me and I may remember; involve me and I'll understand. - Chinese Proverb 236
Take a look at some of our great offers that are currently available! SAVE! SAVE! SAVE!
Everything from CSS, WordPress tips and tricks and everything in between - GO GET IT NOW!
Take a moment to visit our portfolio. Aesthetics and functionality actually DO matter!.

