10 Ways To Speed Up Your Blog

December 8, 2009

speed up your blog

If you’re anything like me, then you hate it when you are on a slow-loading website or blog.  In this time where high-speed internet is freely available, you expect your web browsing to reflect that and not resemble dial-up speeds.  Unfortunately, even with broadband internet, sometimes blogs do not run at optimal speeds.

If your blog is crawling at turtle-like speeds, all is not lost.  Here are 10 things you can do to help speed up your blog.

1. Get better hosting

More than anything else, upgrading your hosting plan can provide the biggest improvement in the responsiveness of your blog.  The cheapest hosting plans are always “shared” hosting, which means the server in which your blog is on is also hosting other people’s sites as well.  The amount of sites hosted on a single server often number in the thousands.  All these sites share the resources of the server, and if one site starts using up a large portion of the resources then the performance of all the other sites will suffer.

You probably don’t need to go so far as paying for a dedicated server, but bumping up from the lower grades of shared hosting will go a long ways into improving the speed of your blog.

2. Optimize your database

Over time, the database for your WordPress blog tends to become cluttered with garbage.  Things such as post revisions and data leftover from deleted plugins increase the size of your database and decrease the performance of your blog.  Optimizing your database can belikened to defragmenting the hard drive on your computer.  Ever notice how after you defragment the hard drive your computer runs a little faster?  It can be the same with optimizing the database of your blog.

There are several methods for optimizing databases, some more complex than others.  One of the easiest methods in doing this is by using the WP-DBManager plugin from Lester Chan.  Be careful when tinkering with databases though; it’s all too easy to hose your site if you make a mistake.

3. Reduce plugins

A universal truth with WordPress blogs is that the more plugins a blog uses, the slower it will operate.  Some plugins are what I would consider to be important, but not all of them are.  Tally up the amount of plugins you are using and ask yourself if all of them are really necessary.  Delete the ones you can live without.

4. Combine CSS files

Combining multiple stylesheets into one reduces the amount of locations that have to be called upon to load a page.  The fewer external files, the better.

5. Compress your CSS files

Removing the “white space” in the stylesheets and using CSS shorthand can provide a little bump in decreasing the load times for your blog.  Granted, stylesheets that are commented and spaced nicely are pleasant to anyone wishing to edit them later, but they do increase the load a tiny bit on servers and web browsers.  It’s much better to turn this:
#header {
margin-top: 5px;
margin-bottom: 10px;
margin-left: 7px;
margin-right: 15px;
padding-top: 7px;
padding-left: 20px;
padding-bottom: 5px;
padding-right: 10px;
}

Into something more streamlined like this:
#header {margin:5px 15px 10px 7px; padding:7px 10px 5px 20px;}

6. Optimize your graphics for the web

The images that are used in your blog are one of the biggest contributors to site slowdowns.  A simple solution to this is to reduce the file size of your images.  This is easily done with programs like Photoshop or GIMP, where you can greatly reduce the file size of the image while keeping most of the image quality.

7. Include image sizes

If you add an image to your blog without inserting its dimensions in the img tag, then the web browser has to spend additional time figuring out what those dimensions are.  Help speed up the process by always providing the height and width when possible.

8. Use the smallest image possible

It’s not always necessary to use a large graphic image, sometimes you can use something smaller and make do.  For example, let’s say you want to use this as the background for your header:

example You could use this entire image for the background, but it would be better if you cropped this image down to just a few pixels wide and repeated it with CSS, like this:

example2

9. Reduce PHP and database queries

You can speed up your blog by reducing the amount of queries your blog has to perform to load a page.  A great place to reduce these types of queries is in the header section, most often found in the header.php file in your theme folder.  An example from the default WordPress theme’s header.php file lists the link to the stylesheet as:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />

You can remove the PHP request by editing this line to read:

<link rel="stylesheet" href="http://www.robmcguire.net/wp-content/themes/default/style.css" type="text/css" media="screen" />

There are many types of PHP and database queries that can be reduced throughout your blog theme files.  Translate what you can and you will reduce the load on your server.

10. Use a caching plugin

One plugin which I would consider a requirement for even blogs that receive little traffic is the WP Super Cache plugin.  This plugin can greatly speed up your site by serving up your visitors a cached version of your blog’s pages instead of calling them up from the database each time.  If you were to only do one of the things from this list to speed up your blog, then this is the one you should go with.

How is your blog running for you?  If you’re having issues with sluggishness, have you tried any of the above ideas?  How have they worked out for you?

{ 2 comments… read them below or add one }

BloggerDaily December 9, 2009 at 10:33 am

Yeah there’s a lot of ways to speed up our blogs but this is the first time I saw about this combining and compressing CSS files. I’ll try that. Thanks!

Reply

Rob December 9, 2009 at 10:40 am

The gains in performance from compressing CSS files is very small, and may not even be noticeable except under benchmark tests. But over time there will be less bandwidth used by removing the whitespace and using CSS shorthand in the stylesheets.

Reply

Leave a Comment

Previous post:

Next post: