WordPress can be a dreadfully slow CMS – anyone who works with WordPress or any CMS system can tell you that. The more code you pack into a theme and the more plug-ins you load will only make things worse. But there are ways to increase the speed of your site by leveraging certain server side compression methods. In this article we will explain how to implement three sever side compression techniques that should increase your page load time and your overall page score by up to 40% with GTMetrix.
The code below should be added to your .htaccess to enable a keep-alive connection:
<ifModule mod_headers.c> Header set Connection keep-alive </ifModule>
There are several benefits to enable Gzip compression because it’s the most popular method to load your site faster by reducing more than 70% page size of your blog. However, now-a-days most of the sites are using Gzip compression across the web. Gzip will load your site in just a few seconds.
You can enable Gzip compression by adding the following code to your .htaccess file:
You can enable browser caching by adding the following code to your .htaccess file:
Simply adding these 3 blocks of code to your .htaccess file will greatly improve the performance of your website or WordPress theme. After you’re done implementing the code head over to GTMetrix and put your site to the test.