Gzip compression helps reduce the size of website files before they are sent to visitors, which can improve page loading speed and reduce bandwidth usage.

Enable Gzip Compression in cPanel

  1. Log in to your cPanel account.
  2. Go to the Software section.
  3. Click Optimize Website.
  4. Select Compress All Content.
  5. Click Update Settings.

Gzip compression will now be enabled for supported content on your website.

Alternative: Enable Using .htaccess

If the Optimize Website option is unavailable, you may enable compression through the .htaccess file when supported by your web server:

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css
    AddOutputFilterByType DEFLATE text/javascript application/javascript
    AddOutputFilterByType DEFLATE application/json application/xml
    AddOutputFilterByType DEFLATE image/svg+xml
</IfModule>

Important

If your hosting server already uses LiteSpeed or another compression system, Gzip or Brotli compression may already be enabled automatically. Avoid adding duplicate compression rules if compression is already active.

Bu cavab sizə kömək etdi? 0 istifadəçi bunu faydalı hesab edir (1 səs)