• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
  • About
  • Contact
  • Subscribe
  • Advertise
methodshop

methodshop

tech news, reviews & how to's

  • Trending
  • Latest
  • Tech
    • Apps
    • Internet
    • Software
    • Security
    • Games
    • Advertising
  • Life
    • Entertainment
    • TV & Film
    • Music
    • Health & Science
    • Family
    • Social Media
    • Food
    • Style
  • Learn
    • Tutorials
    • Reviews
    • News
      • Business
      • Crime
      • Politics
  • Fun
    • Featured
    • Humor
    • Holiday

Home : DIY & Tutorials : How To Easily Enable GZIP Compression For Your WordPress or Apache Website

GZIP Compression
3844328, LOSTMIND

How To Easily Enable GZIP Compression For Your WordPress or Apache Website

One of the easiest ways to speed up your website is to enable GZIP compression. This is easily done and only requires adding a few lines of code to your server's htaccess file.

August 3, 2019 by Joe Michaels
FacebookTweetPinLinkedIn

A fast loading website is good for both your audience and your Google search results. That’s right, Google cares about your site speed, not just your content. And they will reward you with better search rankings because faster sites require fewer Google server resources to scan your site. One of the easiest ways to speed up your website is to enable GZIP compression. This is easily done and only requires adding a few lines of code to your server’s htaccess file.

Requirements:

  • A WordPress or Apache hosted website
  • cPanel or FTP access to your site files
  • Basic coding skills
  • 5 minutes of free time
Here’s how to speed up your website using GZIP compression … #GZIPcompression #WebsiteSpeed #WordPressWebsites #Website #WordPressSites

Click To Tweet

Run A GZIP Compression Test

Before you even start this process, it’s a good idea to first run a GZIP compression check. You might already have GZIP enabled on your website and not realize it. Sometimes hosting providers will make GZIP compression a standard part of your site install. Here are a few services that will test if you have GZIP already enabled on your server. Just input your website URL and wait for the results.

  • Gift Of Speed
  • Varvy
  • Nixcp

GZIP Compression WordPress Plugins

GZIP compression can easily be enabled by just adding a few lines of code to your htaccess file. And there are several advantages of doing it that way. If you are comfortable editing your htaccess file, then skip to the next section below.

But not everyone is comfortable with messing with code. The good news is, there are several WordPress plugins that can help you enable GZIP compression.

  • WP Super Cache: Settings > Miscellaneous > Compress Pages
  • W3 Total Cache: Performance > Browser Cache > HTTP compression
  • WP Rocket: An awesome, but premium plugin that also includes Cloudflare CDN. Compression is auto-enabled.

Advantages Of Adding Gzip Compression Code Directly To Your .htaccess File

Even if you are already using a caching plugin like WP Super Cache or WP Rocket, there are a few advantages of adding GZIP compression directly to your htaccess file.

  1. Reducing Plugin Conflicts: WordPress plugins sometimes conflict with each other and have to be disabled during troubleshooting. It would be a shame to disable GZIP compression, even temporarily, while working out your plugin issues.
  2. Increasing Website Speed: Although small, there’s still a speed improvement by calling the GZIP compression at the server level from the htaccess file instead of via a plugin.
  3. Reduce Opportunity For Errors: Another issue with using a plugin to control GZIP compression is an increase in potential conflicts. Caching plugins usually come with a lot of extra features that you may not need. If you only need a compression solution, then a plugin may just create additional data overhead.

How To Find Your .htaccess File

Before you can edit your htaccess file, you have to find it first. Your htaccess file is on the root level of your web server and can be accessed using several different methods including FTP or cPanel. Talk to your hosting provider about the best way to gain access to your htaccess file.

.Htaccess File
Accessing a “. Htaccess” using transmit ftp for macos.

Another thing to note is that the file might be invisible. Files that have a “.” in front of them, like a “.htaccess” file are invisible. Depending on how you are accessing your web server, you might have to enable an option that allows you to see hidden files.

How To Edit Your .htaccess File

Now that you’ve located your htaccess file, the next step is to edit it. You can either:

  1. Edit Option #1: Edit the file directly from the server or,
  2. Edit Option #2: Download it to your hard drive, edit and then upload and overwrite the old file

There are pros and cons to each option.

Option #1: To directly edit the htaccess file, try right-clicking on the file or look for another option that says edit.

Editing Your .Htaccess File
Editing a live. Htaccess file using transmit ftp for macos

Option #2: There’s an advantage of downloading a copy of your htaccess file to your computer. It creates a backup. That way if something goes wrong, you don’t have to try to recreate your htaccess file from scratch.

However, since your htaccess file starts with a “.”, the file might be invisible after you download it to your computer. Nothing is easy, right? So you’ll need to find that invisible file first before you can edit it.

On Mac, you can do a custom file search for invisible files from a Finder window. Just click on the “+” button and select “Visible or Invisible” under the File Visibility dropdown menu.

How To Find Invisible Files On Macos
Searching for both visible and invisible files named “htaccess” in macos

On a PC, check your Folder and Search Options. Make sure “Show hidden files, folders, and drives” is enabled under the View window.

Add The GZIP Compression Code To Your htaccess File

Now that you have your htacess file open, just copy and paste this code into it. Don’t overwrite any other piece of code. Just add this code to either the top or bottom of the file.

Alternate GZIP Compression Code

If you encounter any issues with the GZIP compression htaccess code above, then try this alternate code.

GZIP Compression Check

After you have installed the code in your htaccess file, the next step is to conduct a GZIP compression test. There are several great services that will test your site’s GZIP compression status. Just input your URL and wait for them to run a GZIP compression check on your website.

  • Gift Of Speed
  • Varvy
  • Nixcp
  • GTmetrix
  • Google PageSpeed Insights
  • WhatsMyIP

GZIP Compression htaccess Tutorial

That’s it! Hopefully, your final GZIP compression test was successful. Congratulations on having a faster website. What worked and didn’t work for you? Please tell us in the comments so we can improve this GZIP compression htaccess article in the future. Thanks for reading!

GZIP Compression WordPress Tutorial: How To Enable GZIP Compression For Your WordPress or Apache Website … #GZIPcompression #WebsiteSpeed #WordPressWebsites #Website #WordPressSites

Click To Tweet

Related Articles:

  • How to Force HTTPS By Modifying Your .htaccess File
  • How To Update Your WordPress Ping List
  • Disable WP-Cron.php To Speed Up Your WordPress Website
  • Gutenberg Sucks! Here’s How To Disable The New WordPress Editor


FacebookTweetPinLinkedIn
Category: DIY & Tutorials, Featured, Internet, Software Tag: GZIP, WordPress
Previous Post:Best Mini Projectors (2019)5 Best Mini Projectors For iPhone, Laptop, Streaming and Gaming (2019)
Next Post:5 Most Popular Teen Shopping Websites (2019)Teens Using Smartphones

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

Sidebar

Popular Posts

  • Job Automation Using ChatGPT Could Make These Jobs Obsolete - Is Your Job On This List?Job Automation Using ChatGPT Could Make These Jobs Obsolete – Is Your Job On…
  • Top 200 Nielsen DMA Rankings (2023) – Full ListTop 200 Nielsen DMA Rankings (2023) – Full List
  • The Surprising Story Behind The NBC ChimesThe Surprising Story Behind The NBC Chimes
  • 7 Pictures Of Naked People Captured By Google's Cameras7 Pictures Of Naked People Captured By Google’s Cameras
  • How To Change The Default LG TV Home Screen To Live TVHow To Change The Default LG TV Home Screen To Live TV
  • Controversial Nimbus 2000 Vibrating Harry Potter Broomstick Has Parents In An UproarControversial Nimbus 2000 Vibrating Harry Potter Broomstick Has Parents In An Uproar
  • 5 Funny Resurrection Jokes To Share On Easter Sunday5 Funny Resurrection Jokes To Share On Easter Sunday
  • 20 Famous People Who Are Members Of The Sleepless Elite20 Famous People Who Are Members Of The Sleepless Elite
  • 30 Dirty Irish Pick Up Lines That Will Probably Get You Slapped30 Dirty Irish Pick Up Lines That Will Probably Get You Slapped
  • The Best Caddyshack Quotes: 30 Famous Caddyshack Quotes That'll Make You LaughThe Best Caddyshack Quotes: 30 Famous Caddyshack Quotes That’ll Make You Laugh

Categories

Ask Alexa St. Patrick's Day - Funny St. Patrick's Day Jokes & Irish Jokes

10 Fun Things To Ask Alexa On St. Patrick’s Day

Amazon’s Alexa can be a fun and helpful part of your St. Patrick’s Day celebrations and activities. Here are some fun Irish and St. Patrick’s Day related things to #AskAlexa.

How To Visually Identify AI-Generated Text

How To Easily Visually Identify AI-Generated Text Without Using A ChatGPT Detector

Wondering if what you’ve read is bot or human-generated? AI text detectors can help, but can be time-consuming. Here’s how humans can train to identify AI-generated text.

Recent Posts

  • How To Easily Visually Identify AI-Generated Text Without Using A ChatGPT Detector
  • 10 Clever Tech Gifts That People Actually Want
  • 10 Fun Things To Ask Alexa On St. Patrick’s Day
  • 30 Dirty Irish Pick Up Lines That Will Probably Get You Slapped
  • Why Chuck E. Cheese Is Still Using Floppy Disks To Make Its Rodent Mascot Dance

Jump to comments

About

MethodShop’s mission is to entertain, inform, and sometimes gross you out. MethodShop has affiliate relationships, so we may get a small share of the revenue from your purchases. Items are sold by the retailer, not by us. All prices are subject to change.

Latest

How To Visually Identify AI-Generated Text

How To Easily Visually Identify AI-Generated Text Without Using A ChatGPT Detector

Clever Tech Gifts

10 Clever Tech Gifts That People Actually Want

Follow

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • Pinterest
MethodShop Animated Zoom Icon
  • About
  • Submit
  • Disclaimer
  • Privacy Policy
  • Contact
  • Subscribe
  • Store

Copyright © 2023 MethodShop · All Rights Reserved