core

Gzip Compression

> Quick definition: Gzip is an HTTP compression method based on the Deflate algorithm. When enabled, it reduces text-based file sizes by 60–80%, cutting the amount of data transferred between ser...

Gzip Compression

Gzip compression is a server-side process that shrinks HTML, CSS, JavaScript, and other text-based files before sending them to a visitor’s browser. The browser receives the compressed file, decompresses it instantly, and renders the page — all without any action from the visitor.

Quick definition: Gzip is an HTTP compression method based on the Deflate algorithm. When enabled, it reduces text-based file sizes by 60–80%, cutting the amount of data transferred between server and browser on every request.

Last verified: April 2026

Disclosure: This page contains no affiliate links — it’s a reference entry.


Why It Matters for WordPress Sites

Every WordPress page load involves transferring HTML, CSS from your theme, and JavaScript from plugins. Without compression, those files travel at full size. With Gzip enabled, a 120 KB stylesheet might transfer as 28 KB. Across a full page load, the savings compound.

We see this consistently on client sites: enabling Gzip alone moves Google PageSpeed Insights scores by 5–15 points on mobile. Pingdom’s testing confirms that Gzip can reduce transferred page weight by 70% or more on text-heavy pages.

Gzip does nothing useful for images, PDFs, or video — those formats are already compressed. It targets uncompressed text assets, which is exactly what WordPress generates.


How Gzip Gets Enabled on a WordPress Site

There are three places Gzip gets turned on:

1. At the server level — the most reliable method. On Apache, add the following to .htaccess:

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript
</IfModule>

On Nginx, the equivalent directive is gzip on; in the server block.

2. Via a caching plugin — tools like WP Rocket and SpeedyCache include a Gzip toggle in their settings panel. This works on most shared hosting environments without server access.

3. Via your host — managed WordPress hosts (Kinsta, WP Engine, SiteGround) enable Gzip by default. We confirmed this is active on all three in our 2025 hosting benchmarks.

To verify Gzip is working, open Chrome DevTools → Network tab → click any HTML or CSS resource → look for content-encoding: gzip in the response headers.


Gzip vs. Brotli

As of 2026, Brotli (the newer compression format from Google) achieves roughly 15–20% better compression than Gzip on the same files. Most modern browsers support both. When a host or CDN supports Brotli, it takes priority automatically — but Gzip remains the universal fallback and is active on the vast majority of WordPress hosting infrastructure we test against.



Additional Reading