Why and How to Speed Up Websites on Host Level
Everyone likes a fast website. Website owners, visitors and even the search engines such as Google. There are many ways to get a fast website but the most underrated part is speed optimization on host level. Very often clients are trying to optimize their websites to perfection while refusing to host them on proper host.
Four ways to speed up websites on host level
1. Use SSD for data storage
SSD stands for “solid-state drive”. It is a storage device, alternative to HDD (hard disk drive). Unlike HDD, which relies on moving parts and magnetism to store data, SSD uses flash memory (just like USB flash drive does).
Thanks to that, SSD handles all the data transitions a lot faster than any HDD ever could. This goes for both data storing and data accessing. Therefore, if your host uses SSD for data storage, your website will store and fetch data to/from the database much faster.
2. Use PHP7
As it often goes with software, newer versions get better optimizations and new features. PHP7 is no different and it introduces a lot of changes which make it a huge improvement over previous PHP version, which was PHP 5.6.
Some of PHP7 features are reduced memory usage, better error handling, smaller data structures, improved security and so on. Online benchmarks of PHP7 vary a lot depending on website type and development details, but all of the results are saying that it is by far the fastest PHP version yet.
WordPress installations on PHP7 are in most cases running 20-50% faster when compared to PHP5.
3. Use HTTP/2
HTTP stands for “hypertext transfer protocol”. It is used for data communication and it is the foundation of the internet we know today. It was originally introduced in 1991 as HTTP/0.9. Version 1.0 followed in 1996, while in 1997 we finally got HTTP/1.1, which is widely in use to this day.
HTTP/1.1 didn’t have an alternative until 2015, when HTTP/2.0 was introduced, after 18 years!
Some of the improvements HTTP/2 introduced are:
- Usage of binary protocol for data transmissions. This allows for better data compression and with it, faster transmissions. HTTP/1 uses plain text.
- Availability of multiple simultaneous downloads over a single TCP connection.
- Elimination of redundant headers and compression of the remaining headers to decrease the amount of data transferred during a session.
So, what is the main difference? Basically, HTTP/2 changes the way data is formatted and transported between clients and servers, which makes a huge difference when it comes to website loading speed.
4. Use “Cloudflare”
Cloudflare provides content delivery network services, DDoS mitigation, website firewall, distributed DNS services and more. It acts as a proxy between the visitor and the hosting provider. And the best part is, it is free (unless you need premium packages).
Cloudflare services related to website speed optimizations are:
CDN stands for “content delivery network”. It is a world-wide network of servers which are storing and providing websites with static resources (such as images, JS and CSS scripts), for maximum loading efficiency.
b) Script minify
This feature will minify HTML and JS / CSS scripts your website is using and therefore, increase the loading speed of your pages.
This works for any type of a website. In case you will be using WordPress, you won’t need to use script minify plugin. Cloudflare will minify your scripts for you, at the host level.
c) Website cache
Cloudflare provides website cache at the host level as well. Just like in the script minify scenario, your WordPress won’t need cache plugin anymore.
What is awesome about Cloudflare website cache is that it uses two phases of processing, eligibility phase and disqualification phase. That way your website cache is protected from “web cache deception” attack.
Yes, this was mentioned before. So, why use Cloudflare for it? Since HTTP/2 was introduced in 2015, some hosts which were active before that date might have a problem with HTTP/2 compatibility. That is where Cloudflare comes in and solves that by activating HTTP/2 functionality through their network.
Obviously, if your website is a shipwreck of large and unoptimized images, weird loops, inline scripts and other bad practices, you will need to address that at the website level. But at the same time, the points I mentioned may make your unoptimized website’s loading speed tolerable. And if you apply them to the optimized website, then the real magic will happen. 🙂