How to speed up your WordPress site with gzip compression
This is a quick note. I don’t pretend to understand what this means, but I was having trouble with the speed that a site was loading and I’ve tried this and it makes some improvement.
I edited the .htaccess file by adding code suggested in this post:
https://www.iceablethemes.com/how-to-speed-up-your-wordpress-site-with-gzip-compression/
The total code in .htaccess file is this:
# Switch rewrite engine off in case this was installed under HostPay. RewriteEngine Off SetEnv DEFAULT_PHP_VERSION 53 DirectoryIndex index.cgi index.php # BEGIN WordPressRewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress # compress text, html, javascript, css, xml: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddType x-font/otf .otf AddType x-font/ttf .ttf AddType x-font/eot .eot AddType x-font/woff .woff AddType image/x-icon .ico AddType image/png .png
These are some useful tools:
- gzip compression test tool https://varvy.com/tools/gzip/
- Page speed test tool https://varvy.com/pagespeed/
Recent Comments