How to Improve WordPress Load Times

Most of us designers can come up with really good web design ideas but what if nobody looks at our designs. Well speed of loading is usually a factor in high bounce rates, this is why I’m going to explain the common mistakes and how to improve load times to get people looking at your web pages and design ideas.

Hosting

There are numerous things that can slow up WordPress sites and I think I seem to have been unlucky enough to have encountered them all at some point. The main issue is hosting and I’m sorry to say that ‘price’ is usually an issue here. Trying to save money on hosting believe me is doing you no favours in my experience. Like most things you get what you pay for however there are still many good hosting companies out there that can host WordPress sites very well for not a great deal of money.

I would recommend hosters such as:

Evohosting
Westhost
Inmotionhosting

At the higher end of things but a bit more expensive you can go for VPS hosting or VPS cloud server hosting. These are more expensive solutions but they give the user greater control over their own hosting allowing you to add and remove features depending on what your websites need.

Cleaning Up Your Code

First off let’s do the easy stuff. Once you have your web design ideas sorted its time to create nice clean code. This isn’t that hard but to do so we need to alter our WordPress themes so that less queries have to be made to the server for information. The more data that is needed results in slower load times. If we take the header section of many themes (header.php) we can simplify a lot of the code by removing php and manually adding the information required.

You can also:

• make your stylesheet URL’s static
• make your javascript URL static
• make your feed URL’s static
• you can remove the blog’s WordPress version
• make your blog’s title and meta info/ description static

By making these changes you are reducing the amount of information that is needed to be called from the server reducing the overall load times of the site.
Once you have done this with the header don’t stop there. If you look through your theme you will probably find more unnecessary php or queries that you can either remove or make static such as:

• your blog’s name
• RSS feed URL
• Comment RSS feed URL

File Improvements

Most designers will already know this but it still causes problems. File sizes especially image, flash etc sizes have a massive part to play in load times. The larger the file the longer the load times. I know flash is great to look at but.swf files can really become large at times and even with preloaders can still frustrate users while they load. Use flash and images wisely, not just for your own pleasure. Think about user experience as well.

Improve Coding Habits

If you are adding code to template files as a result of installing a new plugin then I’m sure you will have added php without function_exists.

You may look at this and say “SO WHAT” well this causes a problem when you disable the plugin or remove it all together. Suddenly there is no function of that name any more however the code still operates and causes an error so you pages won’t load up. In order to solve this problem you could remove the php altogether but if you have numerous plugins active this can be a hassle. Good coding habits when adding functions in the first place would be to add a ‘if function’ called function_exists.

Using this function means that when you now deactivate or remove a plugin no error will occur.

Another poor coding technique is not to embed Flash and other features into sites properly. I’m sure you’ve at some point visited a site and the whole time you are there looked at the status bar and it continues to say ‘ 1,2,3+ items remaining’. This again is due to poor coding and not only spoils loading of a page but also looks unsightly and unprofessional.

Caching Plugins

So you’ve come up with your web design ideas, you’ve cleaned up the code, you’ve done everything necessary to improve load times. Well there’s one last thing to do then. CACHING. WordPress has a number of caching plugins but I would recommend you install either WP-Total-Cache or WP-Super-Cache. Caching will probably show you the greatest improvements as caching images, files etc will result in no further loading of these items improving load times greatly, especially when a user is navigating back and forth between pages within your site.

In conclusions if you want the world to see your web design ideas then it is important to maximise your WordPress load times and avoid those high bounce rates.



Source by Adie Pirie

Leave a Reply