Fast website loading times are vital. Slow page speeds deliver a poor user experience. Faster page load speeds “lead to higher visitor engagement, retention, and conversions.”
Search engines also incorporate page speed as part of their ranking algorithms.
Even a fairly standard vanilla WordPress installation can see significant speed gains with just a few minutes work.
In the below video I take a fresh WordPress instalation with the Responsive Theme installed. Changing to this theme was the only modification made.
The initial page speed score of 48 is improved to 89 in seconds, simply by enabling compression in cPanel and adding the Mime types for JS and CSS files.
Benchmarking Current Page Speeds
Before making any adjustments we need some data to benchmark against:
Both of these tools provide browser plugins, while the Google offering will also enable you to analyse a webpage by passing it a url only.
The Google tool is an excellent place to start. It gives a score out of 100 and lists recommendations ordered by priority (taking into account the gains to be made relevant to the effort required).
Of course results will vary on a site by site basis depending on the web server configuration and power, as well as the WordPress setup such as the theme and any plugins installed.
Speeding Things Up
On my shared hosting account with a basic WordPress install using no plugins and a simple theme, I got a score of 49 out of 100.
The first recommendation listed under High priority was to enable compression (clicking the text will provide further information about the files that are causing the issue and the potential gains that are to be had). This page explains the compression suggestion in more depth.
How to enable compression manually on a web server is beyond the scope of this article. But, doing so on a cPanel hosting account is fairly straight forward (although things rarely go to plan when shared hosting is involved). I’ve enabled this setting with various hosting companies including HostGator without drama.
Enabling File Compression in cPanel
This change will only need to be made once against your hosting account and will be applied across all domains.
After logging into cPanel, under the Software/Services panel you will find the conveniently named Optimize Website link as highlighted in the image below (your actual panel will probably vary depending on hosting provider and cPanel version).
Unless compression has already been enabled against your account the Disabled option will be selected while the MIME Types field will be redundantly filled with: text/html text/plain text/xml.
Compress all content would probably not have any adverse results but I don’t use it.
Now, after re-running the Google tool my score has gone from a 49 to 89 out of 100 thanks to a change that took less than a minute to implement.
The majority of the remaining recommendations from Google are focussed on: reducing the time it takes for the server to respond with the requested page, reducing the number of http requests to be made, and reducing the size of the additional files requested (CSS, JS, image size/sprites etc).
But before looking at any of these more generic optimisations, the next biggest performance gain to be had using WordPress is to install a caching plugin.
WordPress W3 Total Cache
The W3 Total Cache WordPress Plugin seems to be the most popular/trusted.
After installing the plugin and making only a few configuration changes to the General Settings tab, my Google Page speed increases from a 74 to 89 out of 100 (note – this was for a different site than that used in the above video walkthrough).
The only changes I made to achieve this increase were:
- Page Cache, enable (Disk: Enhanced)
- Minify, enable
- Browser Cache, enable
These changes are the bare minimum, and more gains would be expected by further configuring the options found under each section of the plugin’s options.
Other things to look at include:
- Combining multiple images into a single image that is positioned via CSS
- Serving files from a CDN (images, video, CSS, JS)
- Control browser caching
- Better application caching
- Fine tuning Apache/Nginx