Is your WordPress theme loading slowly? If your web site is taking more than 5 seconds or even 10 seconds to load this could be an issue. Your visitors may just leave your site because of this. You can speed up your WordPress load time like it was on steroids!
Your header and footer templates perform PHP calls to your database in order to display your pages and content accordingly. This can have a lot of stress and load issues that can cause your page to load slow. You can reduce these PHP calls to your database by creating static URI’s.
Header Template:
Unnecessary PHP calls to your database that can be change to a static URI or removed.
<html xmlns=”http://www.w3.org/1999/xhtml” <?php if (wp_version()==’21′) language_attributes(); ?>><head profile=”http://gmpg.org/xfn/11″>
<meta http-equiv=”Content-Type” content=”<?php bloginfo(’html_type’); ?>; charset=<?php bloginfo(’charset’); ?>” />
<title><?php if (is_single() || is_page() || is_archive()) { wp_title(”,true); } else { bloginfo(’name’); echo(’ — ‘); bloginfo(’description’); } ?></title>
<meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” /> <!– leave this for stats –>
<meta name=”description” content=”"/>
<meta name=”keywords” content=”"/>
<link rel=”stylesheet” href=”<?php bloginfo(’stylesheet_url’); ?>” type=”text/css” media=”screen” />
<link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(’name’); ?> RSS Feed” href=”<?php bloginfo(’rss2_url’); ?>” />
<link rel=”pingback” href=”<?php bloginfo(’pingback_url’); ?>” />
<link rel=”Shortcut Icon” href=”<?php bloginfo(’stylesheet_directory’);?>/images/favicon-adstheme.ico” type=”image/x-icon” />
<?php wp_head(); ?>
</head>
There are 8 PHP calls in the Header template that can be changed to a static URI or removed. This will reduce load times significantly.
A clean and faster Header Template:
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Your Title Here</title>
<meta http-equiv=”Content-Type” content=”<?php bloginfo(’html_type’); ?>; charset=<?php bloginfo(’charset’); ?>” />
<meta name=”generator” content=”WordPress 2.3.3″ />
<!– leave this for stats –>
<meta name=”description” content=”Your description here” />
<meta name=”keywords” content=”Your keywords here” />
<link rel=”stylesheet” href=”http://www.yoursite.com/wordpress/wp-content/themes/yourtheme/style.css” type=”text/css” media=”screen” />
<link rel=”alternate” type=”application/rss+xml” title=”Your Blog Name”> RSS Feed” href=”http://www.yoursite.com/?feed=rss2″ />
<link rel=”pingback” href=”<?php bloginfo(’pingback_url’); ?>” />
<link rel=”Shortcut Icon” href=”http://www.yoursite.com/images/favicon.ico” type=”image/x-icon” />
</head>
By changing or removing these 8 PHP calls to your database you will improve your web site load time by up to 50%!
You can also download WP Super Cache. It’s a very fast caching module for WordPress. It generates html files that are served directly by Apache without processing comparatively heavy PHP scripts. By using this plug-in you will speed up your WordPress blog significantly.
Need help?
I provide consulting services for a fee of only $5 using PayPal to bosocony@yahoo.com. I will clean your header template, install WP Super Cache, Test your WordPress theme and provide a screen shot of your load time before and after. Don’t have PayPal? No problem, send 1000 EC’s to my account.
![[del.icio.us]](http://blogtbt.com/wordpress/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://blogtbt.com/wordpress/wp-content/plugins/bookmarkify/digg.png)
![[Google]](http://blogtbt.com/wordpress/wp-content/plugins/bookmarkify/google.png)
![[Reddit]](http://blogtbt.com/wordpress/wp-content/plugins/bookmarkify/reddit.png)
![[StumbleUpon]](http://blogtbt.com/wordpress/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://blogtbt.com/wordpress/wp-content/plugins/bookmarkify/technorati.png)
![[Email]](http://blogtbt.com/wordpress/wp-content/plugins/bookmarkify/email.png)


I have done this with my header and footer a while back, cause when I would have a story dugg, or stumbled too many visitors would cause a database connection error. It works!
It works well, and real easy to do.
instead of doing this, you can use wpcache, this way, less calls are made to the database, and pages load faster. anyway your solution is good to, but it is recommended to keep in the header.php because some plugins need it to add some code into to header in order to work correctly..
Hey, can I get a consult on how to change some of the code for better design? i’ve installed wp super-cache already. but I can’t seem to get things to line up and i’d like to make bigger boxes for such, etc.
if you’re willing, nternetmoney@gmail.com
Sebastiano,
WP Cache is great I prefer the super version. Those calls are unnecessary and have nothing to do with calls. I mention WP Super Cache at the end of the blog post.
Web Hosting will check to see if I can see what you’re struggling with.
Web hosting I see no problem with alignment. You site looks pleasing on the eyes.
You may want to try another theme, and those are free. If you need help send me a message.
Excellent advice. I’ve come across a number of blogs that are loading way too slow. There have been a few that I’ve just had to X out of. And I have a 3 meg DSL service.
I’ll definitely look into the Super Cache plugin and my header file.
Curt,
I love that plug-in it really works well. My site load average is 1.8 seconds compared to 5.7 before cleaning the header template and adding WP Super Cache.
Sounds like good advice, I’ll give it a whirl.
WP-SuperCache all the way! It works so great at my site now and definitely is saving so many CPU resources on my hosting account!
Thanks for the tips mate!
Most themes made for distribution on the internet use these codes. They are nice because you just load the theme and it grabs the values itself. Anyone that creates their own theme should use static values.
Shudogg Dot Com - Make Money Online Blogging
This worked really well. Thanks!