Site speed has become an important factor now that Google’s Core Web Vitals update is upon us. People are scrambling to change their sites from page builders to Gutenberg made pages because of this but there are a few things that can also be done to optimize your site speed.
There are three ways compression can be handled in your website:
- In your web server
- In the .htaccess file of your site
- Through a plugin in your WordPress site
Checking your site for compression
The first place you need to check for compression is your web server. Some web hosting companies have already included GZIP compression or Brotli compression in their configuration.
Go to this link at giftofspeed.com and test your site – https://www.giftofspeed.com/gzip-test/
Using a plugin to enable compression
If your site doesn’t have the compression you can add it by installing a plugin to your WordPress site.
There are several free plugins you can use in order to activate the improvements compression gives to your site. Search in the WordPress repository under plugins with the word ‘cache’ to find them.
Some of the suggestions I found in articles throughout the web are W3 Total Cache and WP Super Cache. There is also a paid option called WP Rocket that is suggested by a lot of professionals but I find it on the expensive site, especially if you need to use it on more than one site.
Modifying .htaccess to enable compression
Even though this option was second on the list here and in many of the articles I researched, I left it for last because honestly, I don’t want you to be editing your .htaccess file AT ALL.
If you search for a definition of .htaccess in the web it will tell you it’s just a simple configuration file used for configuring your site at the folder level and for URL redirections. But I feel it’s more than that. Your .htaccess file is what keeps others from going into your uploads file and just browsing through the assets there. You can also do powerful things like password protecting files and directories.
I’m an informatics engineer and have been doing web development for over 20 years, and I DO NOT mess with .htaccess. I don’t include snippets on it found on the web or test things out in it. It’s a sacred file for me as far as I’m concerned and only experts should tangle with it.
That being said, some tutorials on speed optimization will give you scripts to add to your .htaccess file and modify it. But that really isn’t necessary because the WordPress caching plugins will actually modify this file for you depending on how you configure the plugin.
Compression Test GiftOfSpeed – https://www.giftofspeed.com/gzip-test/
There are other ways to speed up your site like changing to a faster theme or finding a host with more capabilities, but you always want to start checking out what you already have at the server level.
Thank you for reading.