Site speed is critical for Google SEO settings. But that is only a secondary reason. Losing customer due to slow loading times is more the primary issue. Half a decade ago, PageRank was the buzzword. Now it’s Pagespeed. There are a lot of best practices talked about everywhere on the web. This post focuses on how to improve Pagespeed of a WordPress website, this journal in particular.
- Improve pagespeed to get the 95+ in both mobile and desktop (Achieved 100/100)
- Gtmatrix scores (both Yslow and pagespeed) should be minimum 95+ (Achieved)
- Pingdom should be minimum 95+ (I could achieve
only 8896, see updates below)
- Achieve less than 4 sec, loading time in testmysite.
In this journey to improve pagespeed, the interesting thing i learned is not to use any of those populaR wordpress caching plugins.
Key aspects to improve PageSpeed and decrease load times are
- Have a lightweight theme – One of the key reasons why I chose a typography-based theme
- to minimize number of plugins – The more plugins, we add, the closer we are to a vulnerability site. Not that all plugins are vulnerable. But you never know.
- pre optimise images – minimise the usage of plugin based image compressors. I use imageoptim and Jpegmini. Both are very powerful image compression applications.
- Try to load google analytics and gravatar images locally.
- All the regular suspects, like gzip, expiry headers, leverage browsers etc. which you would have read still holds good. But we would achieve all those.
I am a big fan of Nginx and I always like to build Nginx with all my custom modules. While my python CLI based project is still in progress. I made a shell based custom Kaapi Nginx builder, which has all the necessary module for speed and performance. Feel free to download the use it. It is only tested on Debian 9. It’s a very good starter. The best part is it has pagespeed module already compiled with Nginx. I have enabled the key filters in the pagespeed module, which is needed to improve PageSpeed.
Now comes the WordPress tweaking. Following are my plugins I used.
- Podamibe custom user Gravitar – This enables you to use custom gravatar, thus give us control the expiry headers, compression etc.
agespeed Ninja – This is the real hidden gem. Simple to use and best plugin, I have ever used.Found Fast velocity minify to be much effective for above the fold issues and I have moved to this plugin.
- Complete Analytics Optimisation suite (COAS) – This loads google analytics from the local server but run a cron separately to ensure that, we always use the latest version of GA. – Ensure that we position the tracking code to footer. UPDATE: Also disabled “display all features” and disabled advertising feature in data collection section of google analytics dashboard. This has made my pingdom score to 96. I can live with this.
Thats all I have done. You can see the proof here.
Happy optimising…..Improve pagespeed