Web-en

WordPress activate gzip compression – Google PageSpeed Insights Enable Compression

In order to render your web pages faster from WordPress, and to score higher on Google PageSpeed Insights, especially on the Enable Compression test, you should activate Gzip compression. You can check if that’s the case for your website on gidnetwork.

Quick hint : best solution is to activate gzip compression for WordPress with PHP by adding this code at the beggining of your wp-config.php file :

ini_set("zlib.output_compression", "On");
 ini_set("zlib.output_compression_level", "-1");
Wordpress activate gzip compression : Add code in the wp.config.php file
Add code in the wp.config.php file

Many plugins promise to make it happen : Gzip ninja speed compression, W3 Total cache, but sometimes it just doesn’t work.

After trying these plugins, this is the result we got – gzip compression wasn’t working, either with plugins or with htaccess update

Wordpress activate gzip compression : Compression not activated, checked on gidnetwork
Compression not activated, checked on gidnetwork

The score on Google PageSpeed Insights for our website were pretty bad

Wordpress activate gzip compression : Bad score on Google PageSpeed Insights due to activate compression
Bad score on Google PageSpeed Insights due to activate compression

Therefore, the best solutions are to update your htaccess, or, if still not working, to add the code mentioned above, to get following results – unfortunately, external scripts can only be improved by their owners.

Wordpress activate gzip compression : Compression activated as checked on gidnetwork
Compression activated as checked on gidnetwork
Wordpress activate gzip compression : Google PageSpeed insights results improved after activated gzip compression in WordPress
Google PageSpeed insights results improved after activated gzip compression in WordPress