Now Reading
Speedup WordPress Tip#3
0

Speedup WordPress Tip#3

by Jason GreenFebruary 3, 2010

Reduce Dynamic PHP Calls in your Theme

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

This is from Tip #18 http://www.wpbeginner.com/wp-tutorials/18-useful-tricks-to-speed-up-wordpress-boost-performance/

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.

About The Author
Jason Green
The writer and owner of Green Complex, Jason is an A+ Certified for Computer Hardware egghead and Eagle Scout since 1999 but has been building computers and programming for much longer. An enthusiast to say the least, his hobbies also include photography, video games, and reading. See his proficiencies on Smarterer.

You must log in to post a comment