How To / PageSpeed / Plugins

How to Increase WordPress Site PageSpeed Score


Here is a quick guide to how to increase WordPress Site PageSpeed Score, to get your WordPress sites load faster and run better on mobile devices.

WordPress websites generally need some work to make everything as fast as possible. I like to use GTmetrix to generate a performance report and look at their recommendations to figure out how to increase my PageSpeed  & YSlow scores. The most common recommendations they list for WordPress sites are the following…

Serve scaled images
Minify JavaScript
Minify CSS
Minify HTML
Enable gzip compression
Enable Keep-Alive
Leverage browser caching
Optimize images

It can be difficult to find solutions for these so I decided to pinpoint exactly what I did to solve all these issues. But there is one plugin that I found that seems to be the necessary for most of my other solutions to work properly. The plugin I’m referring to is called  Above The Fold Optimization and it is an incredibly powerful plugin for increasing your PageSpeed but it can be very complicated to understand how to use all the different things it can do. I honestly only use it to load scripts through a caching proxy which is incredibly simple to do with this plugin. After you install the plugin, go to Appearance -> Above The Fold ->Proxy (Tab at the top) or Once you are there all you need to do is check “Enabled” next to “Proxy Scripts” & “Proxy Stylesheets” and leave everything else blank. You probably won’t notice a big improvement in your speed scores but like I said, most of the solutions I give below will only work if you have done this first.

Serve scaled images

I use the popular EWWW Image Optimizer plugin to create scaled versions of all my images automatically. Although this alone will not likely increase your grade. There is a plugin that hasn’t been updated in over 3 years called Hammy that also seems to be necessary. Don’t worry that you cannot access Hammy’s settings like your supposed to be able to because this plugin doesn’t require you to change any settings for it to work.  You will also need to enable proxy scripts & stylesheets using the “Above The Fold” plugin I mentioned above. The last piece to the puzzle is signing up for a free CloudFlare plan which I will explain further below.

Minify JavaScript, Minify CSS, & Minify HTML

There are ways to do the following using plugins like W3 Total Cache or Autoptimize but I prefer to use CloudFlare CDN instead. Considering if you look at the top of your GTmetrix performance report, you will see “Use a CDN” as one of their “Additional tips“. CloudFlare has a free plan which is all I have ever needed and it is incredibly easy to setup if you know how to change your domains nameservers. After you complete all the steps to add your website to your CloudFlare account, you will be taken to the page with a bunch square blue buttons across the top of the page. Click the “Speed” button & simply check all the boxes in the “Auto Minify” box. You will have to wait up to 24 hours for the transition to happen but they make it completely seamless with no downtime for your website. After they let you know that the transition has completed, generate a new GTmetrix performance report and you should notice a major improvement.

Enable gzip compression

This one is easy, just install & activate WP Performance Score Booster. It automatically enables gzip compression. It also activates some other stuff to help increase all your PageSpeed grades. I have also ran into cases in the past where I couldn’t run a GTmetrix or other types of PageSpeed tests because the site would always cause them to timeout for some reason. I have found that this plugin also solves that problem as well.

Enable Keep-Alive

<ifModule mod_headers.c>
Header set Connection keep-alive

If you run your own apache server you can enable it in your httpd.conf file located at /etc/httpd/conf/httpd.conf. Then simply search for “Keep-Alive” and change it from “Off” to “On“. Make sure to apply the changes by restarting your apache webserver.

Leverage browser caching

This is actually what enabling proxy scripts & stylesheets using the “Above The Fold” plugin I mentioned above is supposed to solve. It probably won’t make a major difference in your grade unless your theme uses a lot of JavaScript files or a crazy amount of stylesheets. But if your theme doesn’t, your grade for this was probably pretty high already.

Optimize images

There is a plugin most commonly known as WP Smush but if you search for it on the WordPress Plugins page it is called Smush Image Compression and Optimization for some reason. It seems to be the best at optimizing images & I don’t see any reason to upgrade to the pro version because the free version works great. It does warn that you can only bulk optimize 50 images at a time with the free version but when I did a bulk optimize of over 300 images, it did them all at once.

Related Posts

Handy Code Snippets / How To / No Plugins Necessary / PHP / WooCommerce

Handy WooCommerce Store PHP Snippets


Here are some Handy WooCommerce Store PHP Snippets that you might find useful... Auto-Complete All WooCommerce Orders [cc lang="php"]...

Handy Code Snippets / How To / PHP / Plugins

List More Custom Field Names


First install & activate the List More Custom Field Names plugin. Then add the following code to your functions.php or your cust...

No comments

Leave a Reply