softmaji-header-wbg-min
softmaji-header-wbg-min
softmaji-blue-header-min
softmaji-blue-header-min
  • Home
  • Services
    • Website Designing
      • Responsive Website Design
      • Static Website Design
      • Website Redesign
      • Landing Page Design
    • Website Development
      • PHP Website Development
      • WordPress Website Development
      • Ecommerce Website Development
      • Custom Website Development
    • Digital Marketing
      • Google Adwords/PPC
      • Facebook Promotion
    • SEO Service
  • Trainings
    • Learn Web Development
    • Learn Graphics Design
    • Learn Business Communication Skills
  • Pricing
  • Portfolio
  • Events
  • Offers
  • Contact Us

Learn to Enable GZIP Compression in WordPress

HomeLearn to Enable GZIP Compression in WordPress

Offer Expire Soon..


Only New User..


The very first solution to achieve faster load times of your WordPress CMS is to reduce your page size. Enabling GZIP compression is the simplest method to reduce the size of your website, and improve the time to first render of your web pages. When you enable GZIP compression on your server it helps to significantly reduce the amount of time to download the requested resource. In this tutorial, you will learn to enable GZIP compression on WordPress.
Let’s start.

Table of Contents

Toggle
  • Steps to Check If GZIP Compression is Enabled
  • Steps To Enable Gzip Compression For WordPress Websites
  • Enable GZIP on Apache
  • Enable GZIP with WordPress Plugin
  • Enable GZIP on NGINX

Steps to Check If GZIP Compression is Enabled

In order to check if the GZIP compression is already enabled on your site, you have to search the Internet and check for ‘GZIP compression online check’. This is one of the easiest ways to check if the GZIP is enabled on your server.

Steps To Enable Gzip Compression For WordPress Websites

You can use several different methods to enable GZIP compression on your WordPress website.

Enable GZIP on Apache

For enabling GZIP compression on Apache web server, you will need to edit your .htaccess file. Add the below lines of code to your .htaccess file. You can find the .htaccess file in the root or the WordPress site.

# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

Enable GZIP with WordPress Plugin

You can also use a caching plugin that support GZIP compression. For instance, the WP Rocket will add GZIP compression rules to your .htaccess file and it will automatically use mod_deflate. For enabling this via W3 Total Cache, you will need to go under its performing section and then enable it.

Enable GZIP on NGINX

To enable GZIP on NGINX, you simple have to add the below lines to your nginx.conf configuration file:

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_vary on;
gzip_types text/plain text/css text/javascript image/svg+xml image/x-icon application/
javascript application/x-javascript;

Surely, you don’t have to enable GZIP compression in WordPress, if you use our managed WordPress hosting service, in which we already include GZIP compression. If there is any issue with this, you can contact our support team via live chat or email.

Faizan Khan
17
Latest News
Prev PostFixing the 405 Method Not Allowed Error on Your WordPress SiteMay 14, 2024
Next PostLearn to enable LiteSpeed Cache for WordPressMay 14, 2024

Related items

otpless-issue
Latest News

OTPLess Not Working? Here’s What Happened!

Imagine this: You run a business, and suddenly, your customers can’t log in to your websit

SoftMaji InfoTech
20/06/2025
11
Latest News

How To Install WordPress Blog?

Let’s see how to install WordPress blog on your WordPress hosting account. Let’s

Faizan Khan
14/05/2024
150
Latest News

How to Install a Theme in WordPress?

Steps to install a theme in WordPress: Log in to WordPress. Navigate to Appearance and cli

Faizan Khan
14/05/2024
137
softmaji-header-wbg-min
SoftMaji is one of the affordable web development company in the web development industry. You don’t have to go searching anywhere for finding a reliable web development partner because we have crafted web development solutions that can fill the void left by others in the market.
Services
  • News Portal Development
  • Custom Website Development
  • PHP Website Development
  • Ecommerce Website Development
  • WordPress Website Development
Shortlinks
  • Blog
  • Offers
  • Events
  • Pricing
  • Reviews
  • Portfolio
  • Our Team
  • Payment Options
  • Explore Packages
Company
  • FAQ
  • Careers
  • Sitemap
  • Feedback
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Refund And Cancellation
Contact Us
4/40 Vipul Khand , Gomti Nagar Lucknow
Uttar Pradesh 226010
Landline - +915223162418
Email - hello@softmaji.in
Office Time Mon - Sat
(10:00AM - 5:00PM)
Sunday Close
+91 9795405324
Lucknow , Uttar Pradesh
Copyright © 2022. All Rights Reserved.