Speedup WordPress Tip#3
WordPress Speed Tip #3 – Remove Database calls from your theme.
Database calls make WordPress so dynamic, but sometimes you can live without it. By replacing simple text, you will be able to increase your WordPress speed.
To give an example look at your header.php code which looks something similar:
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content=" <?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
This code above is calling useless database queries which you can simply put in as text. Like in the example below:
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
By making it slightly less dynamic, you have saved yourself some load time. If you get a custom theme designed for a specific WordPress site then there is nothing wrong with removing these because it will only be used by you. But don’t stop at the header! Word you way all the way down to the footer. My site for example had 118 Database calls just to render the front page! I hope to clean it up better, but I’ve currently got my load time down to less than a second!
You can also reduce database calls by doing the following:
make your stylesheet URL’s static
make your pingback URL static (which I would Remove anyway, they are all but useless)
make your feed URL’s static
I always recommend you remove the WordPress version
I don’t agree with some of the other tips posted there, so I didn’t just direct everyone over there. Like the Database Caching, that tip actually made my site slower! These 5 tips I’m providing are time tested, and I’m not including everything in the book. I think these are all you really need, none of the fluff.