Self-Hosted WordPress Quick Optimization Guide

After trying out some new optimization schemes on this site, I was curious as to how concerned other bloggers are about the quality of their site’s performance. Using a Firefox plugin called YSlow (an extension to the Firebug plugin), my MacBook and I traversed the vast blogosphere in search of truth.

My survey was conducted as follows:

  • I only analyzed blogs which dealt primarily with technology, as I figured if any group of individuals would spend time optimizing their site, it would be the geeks.
  • I used Google Blog Search to conduct my search. The first 20 blogs I found which ran a self-hosted WordPress 2.5+ were added to a list.
    • I only analyzed WordPress blogs since this is the only platform I’m familiar with. Yes, this introduces bias into the survey, but this was just a brief glimpse of the blogging community anyways.
  • Only the main page of the site was analyzed.
  • I cleared the cache/cookies of my Firefox 3 browser prior to visiting each site.

YSlow grades a site out of 100 “points.” For example, th2.e plugin gives Google’s home page a value of 99/100. The main page of this site, RK-home, has been given a 90/100. Considering I’m a just a casual blogger who doesn’t have thousands of dollars to spend on content distribution network services (the main reason I only scored a 90), I’m quite content with the assessment. However, how did others fair? Of the 20 self-hosted WordPress 2.5+ technology blogs I surveyed…

  • 3 scored less than a 60.
  • 2 scored between 60 and 70.
  • 7 scored between 70 and 80.
  • 8 scored between 80 and 90.
  • 0 (yes, a goose egg) scored above a 90.

Another thing I noticed is that most of the blogs which scored less than an 80 could easily score higher if they made some simple revisions. Here are my tips to improving your WordPress performance.

  1. Make sure you’re running the latest platform (version 2.7) unless you have a very specific reason for not upgrading (ie, plugin compatibility)
  2. Use a minimalist theme. This reduces the amount of content that must be downloaded by a user and therefore speeds up loading.
  3. Install both the PHP Speedy and WP-Super Cache plugins. I’ve tested both and can personally vouch for their compatibility with WordPress 2.7.
  4. Edit your main .htaccess (typically located under username/public_html of your host) with a text editor. Include the following code to correct ET tags and expiration headers (I’m pretty sure this is unnecessary if you’re using PHP Speedy’s features):

This will take care of the ET tag and expiration header information. Also, there is some additional code which will cache files that most people don’t modify over time. Mind you, some of this code may be redundant with what the aforementioned plugins provide, but hey, more is better? XD. Put this into your .htaccess file:

# BEGIN Caching of things which usually don't change
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=29030400, public"
</FilesMatch>
# END Caching of things which usually don't change

# BEGIN FireBug/YSlow ET Tag and Expiration Headers
Header unset ETag
FileETag None
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
</FilesMatch>
# END Firebug/YSlow ET Tag and Expiration Headers

By following these steps, you should be able to improve your YSlow score and overall performance.

You might also like

Leave A Reply

Your email address will not be published.