OK, so you have a WordPress website and FTP access? Great! Here’s a quick guide on how you can vastly improve your Google Page Speed score in just a few minutes.
The plugin W3 Total Cache will cache and compress a load of files to reduce page download time.
Modifying the .htaccess file to tell the browser to cache and compress various files to reduce server load and improve page speed performance.
That’s it, all done – double check your site to make sure everything is working. Head over to Google PageSpeed Insights and enter your website address to get your Page Speed score.
How fast your website loads is increasingly important. People expect sites to load quickly, we have less patience and if a website hasn’t loaded within 2 seconds, your website visitors will become frustrated and go elsewhere before they have even seen your content. Furthermore, Google now uses page speed as a ranking factor and it’s fair to assume that a website’s load time will become increasingly important as internet speeds increase along with our expectations. It sort of makes sense. Google wants to (and has always wanted to) return the most useful results in the SERPS and sites that are constantly slow are of little use.
WordPress drives nearly 20% of the web. This is a phenomenal amount and many degrees higher than any other content management system. Yet most WordPress website owners probably aren’t aware of some of the tools available to help increase WordPress site speeds and page speed scores.
When I tried these techniques out on a new site with a custom built theme, my Google PageSpeed score increased from 39% to 95%, an increase of over 50%!
The W3 total cache plugin has a number of features that can help improve page speed but I think the following aspects are the most important:
Page caching basically saves each page on your WordPress website or blog as a regular .html file on your server. This will be served to the visitor directly rather requiring the database to generate the pages each time they are visited.
Browser caching allows web browsers to save files on the visitors local hard drive which increases page load time and decreases server load as files don’t have to be downloaded repeatedly.
Other caching options
There are also other caching features including database and object caching. These will cache common database operations to further reduce server load time. I often don’t like to enable these functions however as there can be a huge number of database operations going on which can create thousands of files and folders on your server. For users with shared or VPS hosting packages especially, this can use up disk space or use up ‘inode’ resources.
If you’ve ever seen the suggestion ‘leverage browser caching’ when using Google Page Speed Insights, this .htaccess modification does just that. It basically tells the browser to cache certain file types and gives default expiry time for when the browser should re-check the files. This will only work on Apache web server set-ups however using module mod_expires.c, which should be enabled by default on most Apache setups.
The first part of the .htaccess modification adds a line to check if mod_expires.c is present and if it is, activates the expirations with the command ExpiresActive On. Then we can set a default expire time for all files and then specific expiry times for each file type. For example, I will rarely update existing images, so they are given a longer expiry time of 1 month.
Setting up both the caching plugin and .htaccess modification for improved page speeds is best done once a site is live. During development, there can be many frequent updates and you won’t want to empty the W3 plugin cache and browser cache each time you make an update.
There are many additional techniques that you can also implement to increase your WordPress site’s page speed but with this post I’ve focused on a couple of ‘easy wins’ – the actions that take the shortest amount of time but give the highest page speed improvements – caching and .htaccess modification. Other improvements include things like optimising images (both compression and size), optimising the WordPress database and increasing server response speeds – VPS or Dedicated servers for example usually have higher speeds and better page speed scores over shared hosting solutions.
Disclaimer: Please note that results will vary, page speed scores are highly dependant on many things including server response time and image optimisations.
19 ways to improve the speed of your WordPress website »
Automatically optimise WordPress images for maximum compression »
WordPress website slow? Time to optimise your database »
10 advantages of developing bespoke WordPress themes »