How to Improve WordPress Page Load Times

Guest post by Andrew Lewis from 1-2-Free ISP |

In the light of Google’s recent announcement that speed is now officially a ranking factor in their search engine algorithm, it is important to make certain considerations to improve page load times across all of the key pages on your website. Speed shouldn’t just be for the search engines though — the reason that Google are using it as a factor is that they are pushing to give the searching user the best possible experience — and that is what you should be striving for too. Visitors who have to wait around 1-2 minutes for a page to load aren’t going to stick around very long, and some studies suggest users are even unwilling to wait 10 seconds before leaving the website.

Here are some key ways you can improve page load times within WordPress:

1. Reduce Database Connections

WordPress themes — especially those developed by the inexperienced — often have core template files that have multiple database calls where they aren’t particularly necessary. When linking to a style sheet or an image, do you really need to output the web path via PHP with a database call? It is far more efficient to hard code these URLs so that there is less server-side code executed, and less interaction with the database. Avoid databases calls wherever possible, and the visiting users to your website will have a better experience for it.

2. Cache Your Content

If you are using WordPress as a CMS for your website, it is far more efficient to enable caching for your visitors, so they don’t have to reload the same content as they are visiting your website over and over. Allowing images and other large files to be cached means that a local copy will be loaded for the user the second time they visit the page, which vastly reduces the time they have to wait for content to load. Try out WP Super Cache for a configurable caching plugin for WordPress, which will provide real benefit for your users — and improve page load time significantly.

3. Image Compression

Large images on the web are one of the biggest causes of slow page load times, and WordPress isn’t particularly good at compression unfortunately. If you are using large images for page backgrounds or in

classes, try replacing them with block colours or pixels. If you have to use large or high quality images throughout your website, you should look to first compress them at the saving stage (ie. in Photoshop or similar), then try using Yahoo Smush.It to reduce the file size even further.

4. Combine Multiple CSS / JavaScript / Image Files

Each time a person visits a web page, the internet browser (be it Internet Explorer, Firefox, Google Chrome, etc) has to download all of the external content on that page. This includes:

– Images

– Style Sheets

– JavaScript

– Embedded Modules

Although modern browsers have become very efficient at handling the multiple downloading of web files simultaneously, they are still limited by the maximum number at any one time. This means that if you have 100 external files on one page, the user will be sat waiting while all of this external content is downloaded before they can view the entire page.

To eradicate this issue, try combining common data into single files. Combine and compress CSS code into a single style sheet instead of linking out to multiple files. Do the same as above for JavaScript, ensuring you use an appropriate Java compressor. For images, try creating image sprites that are positioning based on absolute CSS rules.

5. Split Large Pages and Lists of Comments

The more content that needs to be downloaded on a page, the longer it is going to take for somebody to load the page — this should be common sense. One thing that WordPress can be guilty of sometimes is to allow people to display large lists of posts in categories or on the home page, which can be a big issue for page load times. To solve this issue, show snippets of your posts (using the excerpt) instead of full content, limiting the number of posts to approximately 5 per page. Similarly, use pagination for lists of comments — limiting them to roughly 25 per page. Not only does this enhance user experience and load time, it will also increase user engagement and the amount of time they spend on your website (inc. number of page views).

Make Considerations for Others

Even with today’s high-speed internet capabilities, not everybody can access broadband, or they simply don’t wish to upgrade to it. There are still many dial up providers across the web that cater for these users, and they actually make up a rather (surprisingly) large portion of the web. If you are monitoring a current website, you may want to delve into your Google Analytics data to take a look how many of your visitors are running dial up, by doing the following:

– Log in to your Google Analytics dashboard

– Click ‘Visitors’ in the left-hand navigation

– Select the ‘Network Properties’ drop-down menu

– Click ‘Connection Speeds’ from the list

…you may just be surprised how many users are using dial up connections.

Make considerations for users of slow connections, users with old computers, and users in your target location, and your website is sure to give the best possible visitor experience.