Table of contents of the article:
Many website owners find their websites extremely slow and immediately turn to Google for answers, tips, and suggestions for improving performance. They usually end up with the well-promoted PageSpeed Insights, Pingdom, and GTmetrix tools.
PageSpeed Insights is from Google so it's great ?
If Google created something that even approaches performance and has the word "speed" in its name, what do you expect Google to return in its search results? Of course, they'll show you their own PageSpeed Insights , and you'll think it's the only, most comprehensive, and most importantly, true (?) performance benchmarking tool ever made!
Same thing for Gtmetrix - if something is popular it can't be possible it's a bad thing, right?
This is not quite the case
Just like PageSpeed Insights, it's a good tool only for those who just want to get scores . After all the tweaks, after all the optimizations they make, they're left with a site that's just as slow as before. The change you get in actual perceived performance after following their recommendations is negligible . All you get is a score you think is decent, but your website visitors think otherwise. You got a score of 95 on PageSpeed Insights? Congratulations! Your website still takes 10 seconds to load? I don't think your website visitors will congratulate you on your "decent" score.
And to add insult to injury, with all those amazing optimization tips coming from these 2 tools - website owners end up with a website that breaks every time WordPress / Magento / or whatever CMS you use, are updated to another new version.
There are very serious problems with both tools. If you understand them, you'll know that these tools shouldn't be used for anything other than bragging about your stupidity—they're called vanity metrics for a reason.
They aren't really telling you why your website is slow
Both tools report frontend issues , while the more common performance issue is the backend performance configuration of the software and hardware running the website. You can scale resources, enable Expires headers, Gzip compression , etc., only to end up with the same slow website you had before hitting Google for answers.
But how can you really get a faster site if not through the use of these tools?
Hosting plan
First of all, consider the hosting plan you are running your website from.
Are you paying $5/month for shared hosting on Godaddy or Dreamhost? Why would you expect ANY performance at such a low cost? You can never get decent performance for this budget. This is due to the nature of shared hosting itself: your website's performance depends on low-end hardware and the popularity of other clients' websites hosted on the same server. This isn't the case with VPS servers, or even better, with Dedicated Servers.
Will PageSpeed Insights and GTmetrix tell you your hosting is bad? No, they won't. They'll make you do all those stupid client-side optimizations in vain—those things that don't make much sense for sites like WordPress and Magento. Because their performance is tied to servers, servers, and nothing but servers.
Upgrading to the Virtual Private Server (VPS) hosting plan is just the first step in getting a well-executed website.
Server software and real optimization
Now what PageSpeed Insights and GTmetrix will never tell you, is how you can optimize your software. Simply because they can't SSH into your server to tell you what systemic problems you have and how you could fix them.
Nor can they tell you what the perfect setup for your server would be suitable for your website.
Below you can find the real website slowdown problems in 99% of cases:
No Full Page Cache (FPC) configured on the PHP website
It doesn't matter if you are using the WordPress website, Joomla, Symfony or something else. A full page cache solution should always be used. For example, with WordPress, you should be using W3 Total Cache and Joomla has its own caching. Without a full page cache, good performance is difficult unless you have a high-end server running your website.
MySQL query caching disabled
It is never enabled on shared hosting, but many managed VPS providers have also disabled it. You should enable this setting and configure it properly both based on the physical ram you have available and the size of the tables and dataset in use,
No PHP accelerator installed
You must always install and use PHP accelerator extensions: Zend Opcache or APC. This allows you to avoid the "precompilation" of PHP files that are actually interpreted. In this way the file is read once, precompiled and put into memory and then reused by them, skipping the reading and precompilation phase which would occupy I / O and computational resources unnecessarily since the file is always the same.
Apache is used
It will also be the most famous Web Server but Nginx beats it in terms of performancea bit like comparing a train with a plane in short.
Remove Apache and install Nginx. You will have all the same functionality as a web server, with low memory footprint and incredible speed.
HDD is slow
Hardware problem. There is no reason not to use a server that is powered with SSD drives. If you know the difference between Windows OS and regular HDD vs SSD in terms of boot time, you can know what kind of performance difference you can get with a server that uses SSD. Better still if you are using nVME disks which are much faster than the already very fast SSD disks.
Low RAM
There is no guaranteed RAM for your website on shared hosting, it will always be slow and underperforming. Consider ordering a VPS with at least 8GB of RAM for a busy website.
