Your site is slow and it is almost never the hosting
“The site is slow, let us change hosting.” It is the proposal that arrives first and the one that fixes things least often. A more powerful server helps if the server is the bottleneck; on most slow sites it is not.
1. The images (almost always)
Cause number one, by an enormous margin over the others. A photograph taken on a modern phone weighs between 3 and 8 megabytes. Uploaded as it is into a twelve-photo gallery, that is fifty megabytes for one page.
The remedy is trivial and nobody does it: resize to the dimensions the image is actually displayed at, convert to a modern format, and load the images below the fold only when they are needed.
On a site that has never done this, that single change cuts the load time more than any change of server.
2. The plugins nobody ever removed
A site with years of sediment — one plugin for the form, one for galleries, one for sliders, three for security, two doing the same job — loads all of their code on every page, including where none of it is needed.
The cost is not only weight: every active plugin is code running on every request, and some of them query the database dozens of times to draw something nobody looks at.
A test you can run in ten minutes: switch them all off on a staging copy and turn them back on one at a time, watching the load time. The culprit nearly always shows itself.
3. What your site asks of other people’s servers
Fonts loaded from Google, maps, embedded video, tracking pixels, chat widgets, review badges. Each is a connection to a server you do not control, and your page does not finish loading until they have all answered.
If one of those services is slow that day, your site is slow that day, and your logs contain no trace of why.
There is also a matter that is not about speed: every request to an external server hands that server your visitor’s IP address, often before they have consented to anything. Fonts, for instance, can be self-hosted — and one line solves two problems.
When it genuinely is the hosting
When the server’s response time on a simple page is high even with no traffic. You can measure it in a minute with any free tool: if time to first byte is over half a second on a page doing nothing complicated, then yes, the problem is underneath.
But check that number before signing a new contract, not after.
$ ls ./journal --altri
Read next
Automation: where you actually start
Non dal processo più importante. Da quello più noioso, ripetitivo e verificabile — e c'è un motivo preciso.
A backup nobody has ever tried restoring is not a backup
È una copia. La differenza si scopre nel momento peggiore possibile.
Mobile app or web app? That is not the right question
Prima di scegliere la tecnologia bisogna rispondere a una domanda sull'uso, e le risposte possibili sono solo tre.
