Make WordPress Loads Faster

WordPress consist of too many commands before it bestow upon you. The basics come in form of HTTP request, database extraction and downloading the embedded elements. All these contribute very well not only in slowing your WordPress loading time but also generate additional restrain to your server. A simple solution is, optimize your header.php file thus reducing the HTTP request.

By default, most themes come with generic codes. Depending on the theme you use, you will find the codes are similar to these:

<title><?php bloginfo(’name’); ?> <?php bloginfo(’description’);?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>"  />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>"  />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="icon" href="<?php bloginfo('stylesheet_directory');?>/favicon.ico" type="images/x-icon" />
<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

As you noticed, these codes alone generated 8 commands which need to be executed before it loads on your screen. I used to have slow loading time due to numerous commands it made, especially during ‘busy hours‘ but by examining these codes, I noticed that there are so many commands that can be turn static, thus eliminating those unnecessary executions.

I modified most of the PHP commands except for the title tag since it is crucial in order to optimize the title page. The rest, I changed them as follows:

<link href="http://www.neatten.com/wp-content/themes/theme_name/css_file.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.neatten.com/feed/rss/" />
<link rel="alternate" type="text/xml" title="RSS .92" href="http://www.neatten.com/feed/rss/" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="http://www.neatten.com/feed/rss/" />
<link rel="pingback" href="http://www.neatten.com/xmlrpc.php" />
<link rel="shortcut icon" href="http://www.neatten.com/wp-content/themes/ theme_name /image_dir/favicon.ico" type="image/x-icon" />
<meta name="generator" content="WordPress 2.5.1" />

Since this blog uses static theme, I don’t think these commands are necessary. These modified codes still served their purposes even in form of plain HTML, weren’t they? Keep an eye on the meta name="generator". It serves nothing except to display your current WordPress version. Just change it to the latest version you are using. Why burden your server?

Rule of thumbs is, if the PHP commands can be made static, then do it.

digg reddit delicious stumbleupon technorati furl ma.gnolia
Does this post useful? Subscribe to RSS Feed for updates.
Posted on: June 7, 2008 | Under Blog Optimization 
 

Share your thoughts




Speak your mind