- Need Help In Regards To An Article - Visit The Howbits Forum
Close Bar

Quick Tips For Wordpress Speed Up

Quick Tips For Wordpress Speed Up

The subject of optimizing Wordpress and making a website Stumble / digg proof, has been rehashed so many times, that I had to talk myself into even writing a post about it. This list is short and straight to the point about optimizing Wordpress, with easy to use plugins and tips. Most of these have been mentioned several times before, but since I just re-did the design on my website and had to optimize it all over again so that it would load as fast as possible, I figured now would be a good time to post about how to do it, since it’s still fresh in my mind. This list is for people who don’t have access to the http.config file or the Php.ini file. It is over the top configuration, so no editing of the htaccess file.

Recommended website to check out the loading speed of your website, and how big the web site file that is sent to each visitor. Website Speed Test

Wordpress Plugins - This article includes an advanced tweak for wp super cache, I have also included instructions on other things you should do instead of relying on the plugins to do all the work. I just wrote an article about must have and highly recommend Wordpress plugins and all of these plugins are listed, with some other plugins that most bloggers should have and use.

Wp-Super-Cache - Whenever your website is viewed or indexed, your database dishes out the information for the page. This can cause the website to load slow if the database has to do this for every visitor on your website. Wp super cache, takes the database information and makes static content that can be resent thousands / millions of times, so that the database doesn’t have to recreate the webpages every time someone visits your website.
Advanced Wp Super Cache tip - Some people try to get the most out of this great plugin. The most common tweak is adding Gzip to the plugin, so that the page is zipped up and sent in a package to a visitor, which can result in a faster loading webpage. I say to use this at your own risk, I have had some issues with it where my webpage comes up as a blank index with nothing loading up, even though to me the page appears to be working fine. I ended up removing this tweak, even though the problem occurs only a couple times a week. For those brave souls out there that want to give it a try, heres how you add it.

Note: Even though this tweak adds gzip compression to the wp super cache, you do not need and should not enable the default the gzip for Wordpress. Just do this tweak and leave it at that.

Edit: wp-cache-phase1.php  (located in the wp-super-cache plugin folder)
Add This line:
if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);

Before this:
foreach ($meta->headers as $header) {
header($header);

Another Gzip method that I prefer to use instead of the above mentioned is this tweak

Edit: /wp-content/advanced-cache.php

Add:
if ( extension_loaded(’zlib’) ) ob_start(’ob_gzhandler’);

Before this:
foreach ($meta->headers as $header)

These two tweaks do work together, and you will get a speed boost from the use of both of them.

Optimize DB - This plugin saves you the time of logging into PhpMyadmin and optimizing the Database manually. It reads you database from the Wordpress backoffice and if need be it gives you the ability to optimize the most used database areas. Don’t get me wrong, you will still need to log into your phpmyadmin every now and again and optimize all your tables. I wrote a guide on Optimizing Database to avoid Excessive CPU Usage.

CSS Compress - CSS compress will go through your CSS files and trim them down to a smaller size so that your webpages load up faster. It does this by removing Whitespace and comments within the CSS files. Don’t knock this plugin saying that a 10 to 15 kb shrinkage of a stylesheet file is nothing. During a heavy traffic load anything helps, and this does make a sizable impact on the loading of a webpage and the bandwidth usage. The installation is uploading the plugin and activating it, that’s all there is to it.

Advanced CSS Compression Tip - Even though I use CSS compress, I still go and use a web tool that shrinks my CSS files more then the CSS compress can. I noticed some times that the CSS compress can miss somethings, so as a precaution I copy my CSS text into this website and let it shrink it down then I paste it back into the CSS file. The best website I have found for doing this is, CSS Drive Gallery. I set the compression level to normal, then I set it to strip all the comments, then I paste in the code from the CSS file and press compress it. Once the next screen comes up, then I proceed to delete the white spaces between each code line. I have used the super compact option, but I have had issues with it, so I just avoid using it.

Wordpress File Changes

If you have not turned on the Caching that comes with Wordpress, then you really should do this. It works with Wp super cache and it does make a difference. I prefer to use a time out on the Wordpress cache code, instead of using the Generic Cache renew time. I like to have Wordpress keep it cached files saved longer then the default 900 seconds. If the web page is being hit hard, then this works in your favor since Wordpress is not making a new cache every 15 minutes.

You want to edit you wp-config file which is located in the root of your Wordpress install. Once you open it up you want to insert this code just before the end ?>

define(’ENABLE_CACHE’, true); // Cache on
define(’CACHE_EXPIRATION_TIME’, 604800); // Time in seconds, default is 900s

It will look like this -

Quick Tips For Wordpress Speed Up

If you want even more control over the Core Wordpress Cache you can download the PJW -WP-Cache-Inspection plugin, this will give you the ability to clear out the cache at the click of a button, and it will give you stats about the page caching right on the web page screen. Yes the website is in Deutsch, but the plugin is in English, just scroll down the page, and look for the plugin download under the paypal donate box.

Other ways to increase your Wordpress loading speed

I am sure you have heard this 100’s of times before, but one of the best things you can do is to remove unused plugins. By doing this, you remove extra Database actions, which means less work for the Database which makes your website load up faster. Some of the smaller things you can do to limit the database use is to look over your header.php file and remove the database call which is the php script and just put in the link directly. This way the database has one less action it has to perform.

Example

<link rel="stylesheet" href="<?php bloginfo(’stylesheet_url’); ?>" type="text/css" media="screen" />

Better (just replace this code with your current wordpress theme, and change the stylesheet.css to the default css code that your website uses)

<link rel="stylesheet" href="http:/howbits.com/wp-content/themes/yourtheme/stylesheet.css" type="text/css" media="screen" />

If you use the Optimal title Plugin, then I recommend not changing the Website meta <title>. If you do not use the optimal title plugin, then some people recommend changing it to your websites Title, which is one less database call.

Example

<title><?php if (is_home () ) { bloginfo(’name’); echo " - "; bloginfo(’description’);  } else { wp_title(”,true); echo " - "; bloginfo(’name’); }?></title> 

Better

<title>Howbits - Tidbits, helpful tips, and Guides</title>

There are a lot of php calls that you can clear out of your header and footer files, you just have to look for them and replace them.

Helpful Tip and Advice - The easiest way to get the right link addresses, is to load up your website in a web browser, goto view,  then page source, and then locate the code you are changing and copy and paste it into the header / footer file. This reduces the need to have to figure out where the files are located, or where the link rel is referring to.
 

Social Bookmarking

If you use Gregarious, Socialable, or any other social bookmarking plugins, make sure you put the Digg buttons, Reddit buttons, etc, on the Post page, and not on the Front page of your blog. Each time your website loads, it will go and check how many votes you have for each article and it will really lag your website. I prefer to use the Digg image over the Digg Badge that displays diggs, when I switched this, I noticed a major boost in website speed.
 

Last but not Least - Pictures

This one is common sense, but it’s still worth mentioning. Whenever you use a picture on your website, from a logo to a blog entry, take a couple seconds / minutes, and shrink down the size of the picture.

Tip: For every theme I use, I go back through the images folder of the theme and shrink down the pictures as much as possible. You will be surprised how many theme images(Gif, Jpeg, Png) can be shrunk down to 50% or more of the original size, this alone can result in a faster loading website.

 

 If you need help with any of this feel free to leave a comment, or post on the forum. The forum is new but I do check it every day and I am trying to get it going.

Related Articles:





Post a Comment or Leave a Trackback

One Trackback

  1. By bloggingzoom.com on March 11, 2008 at 7:07 am

    Quick Tips For Wordpress Speed Up…

    This list is short and straight to the point about optimizing Wordpress, with easy to use plugins and tips. It involves some of the basis advice for speeding your blog, to some of the more advanced tips and tweaks for making your website Digg, Reddit, …

Post a Comment

Your email is never published nor shared.