How to Enable GZIP Compression for Elementor

GZIP Compression reduces the size of files sent from your server to a browser. As GTMetrix.com explains:

“When a user hits your website a call is made to your server to deliver the requested files. The bigger these files are the longer it’s going to take for them to get to your browser and appear on the screen.

Gzip compresses your webpages and style sheets before sending them over to the browser. This drastically reduces transfer time since the files are much smaller.”


For Apache users, ToolKit adds the following to your .htaccess file when you select “GZIP Compress” via the Additional Server Tweaks area.

<IfModule
AddOutputFilterByType DEFLATE “application/atom+xml” \
“application/javascript” \
“application/js” \
“application/json” \
“application/ld+json” \
“application/manifest+json” \
“application/rdf+xml” \
“application/rss+xml” \
“application/schema+json” \
“application/vnd.geo+json” \
“application/vnd.ms-fontobject” \
“application/wasm” \
“application/x-font-ttf” \
“application/x-javascript” \
“application/x-web-app-manifest+json” \
“application/xhtml+xml” \
“application/xml” \
“audio/mpeg” \
“audio/*” \
“font/collection” \
“font/eot” \
“font/opentype” \
“font/otf” \
“font/ttf” \
“image/bmp” \
“image/jpg” \
“image/jpeg” \
“image/png” \
“image/svg+xml” \
“image/svg” \
“image/vnd.microsoft.icon” \
“image/x-icon” \
“text/cache-manifest” \
“text/calendar” \
“text/css” \
“text/html” \
“text/javascript” \
“text/plain” \
“text/markdown” \
“text/vcard” \
“text/vnd.rim.location.xloc” \
“text/vtt” \
“text/x-component” \
“text/x-cross-domain-policy” \
“text/xml”\
“video/mp4” \
</IfModule>


On NGINX servers, performance plugins are not able to automatically make server-level tweaks. Also, NGINX servers tend to use Brotli Compression which is more powerful than GZIP- and thus will not need GZIP.

If for some reason your hosting server is NGINX but is not using either Brotli or GZIP (rare), you’ll need to manually add this to /etc/nginx/nginx.conf

# Enable Gzip compression
gzip on;

# Compression level
gzip_comp_level 5;

# Don’t compress files under 256 bytes
gzip_min_length 256;

# Compression MIME-types
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-font-opentype
application/x-font-truetype
application/x-javascript
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/eot
font/opentype
font/otf
image/svg+xml
image/x-icon
image/vnd.microsoft.icon
text/css
text/plain
text/javascript
text/x-component;

# Disable gzip for older browsers
gzip_disable “MSIE [1-6]\.(?!.*SV1)”;

Then, restart your server using the following:

$ service nginx restart


For LiteSpeed users:
You can enable compression through the configuration under “tuning”.

Simply go down to “enable compression” and verify that it is enabled, if not, click “edit” then choose to turn it on.

Want to learn more about GZIP Compression?
Check out this explanation on GZIP Compression and how it works
Test your domain to see if you already have GZIP Compression activated