It is essential to reduce the size of your website’s pages to make it load faster. To make it possible we need to compress HTML, CSS, Java or we can say a full page of a website. The first thing that pops in my mind to reduce the size of the site is through GZIP compression. Enabling GZIP can reduce the time to access the web page as it reduces the usage of the data for the audience and improves the time to render your site.
Every kind of browser supports GZIP compression and automatically adjusts GZIP compression for each HTTP requests.
What is GZIP Compression?
It won’t work on pictures because they are compressed differently. It can compress up to 75% of file size, and this makes it one of the best optimizations for WordPress.
How to check if GZIP Compression is working?
The simple method to check whether GZIP compression is working or not is through a free tool GZIP compression tool powered by SEO Suite.
It will also show you Uncompressed page size as well as compressed page size and how many per cents of bandwidth you are saving.
Now let’s share how to enable GZIP compression in WordPress
There are many ways to enable it.
Enable GZIP through WordPress Plugin
There are many WordPress plugins available online for free as well as paid. For my website, I use WP Rocket, but it’s a paid plugin.
WP Rocket offers lots of functions including GIZP. It costs $ 49 for 1 website, $99 for 3 websites and $ 249 for unlimited websites. Each plan includes one year of support and updates with 14 days of money back guarantee.
W3 Total Cache is another plugin which I recommend, and it’s free. W3 Total Cache comes with many functions which include GZIP compression.
Enable GZIP on Apache
A second method is simple, but you need to do it by editing the .htaccess file to allow GZIP compression. Commonly shared host use Apache, where you need to add the code shown below .htaccess file. You can find your .htaccess file at the root of your WordPress site through cPanel or FTP.
You need to add the code in your .htaccess file like shown below.
Enable GZIP on NGINX
If you are operating on NGINX, then add the code shown below to your nginx.conf file.
So now, you have learned How To Enable GZIP Compression In WordPress. If you have any queries. Write in the comment section. I will be more than happy to answer them.