What Is WordPress Gzip Compression

By | June 19, 2018

Here Is How You Setup WordPress Gzip Compression For Your WordPress Website In cPanel

Here are a few different snippets of code to manually add Gzip to your .htaccess file INSTEAD of using the method shown in the video to simply click on the optimize website feature within your cPanel control panel.

If you are not sure what you are doing then either contact your web hosting service for the details – just tell them that you are wanting to install Gzip on your server – or stick with the simple method outlined in the video.

** The main reason why you might want to use this MANUAL method is if you want to ‘Gzip’ only certain file types and not others. **

Gzip1 = mod_deflate
Gzip2 = mod_deflate (a different code. Use 1 OR 2 but not both)
Gzip3 = mod_gzip
Gzip4 = Only Use On Top Of PHP Page

**********************************************
# Begin Gzip1
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
#End Gzip1

**********************************************
#Gzip2 compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddType x-font/otf .otf
AddType x-font/ttf .ttf
AddType x-font/eot .eot
AddType x-font/woff .woff
AddType image/x-icon .ico
AddType image/png .png

**********************************************
#Begin Gzip3
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
#End Gzip3

**********************************************
Gzip4
This is only used at the very top of the php pages. Put it at the very top of the header.php and it will automatically be in all php pages on that WordPress site.

CLICK HERE TO READ MORE ABOUT:  How To Optimize WordPress Database

 

free website traffic

 

<? ob_start(“ob_gzhandler”); ?>

 

Gift Of Speed Description

Gift Of Speed

 

Click Here To Test Your Website At Gift Of Speed

Use our website speed test, tools and techniques to optimize page speed and the overall website performance.

Studies show that when a web page doesn’t load within three seconds 25% of visitors will already have left. A slow website or even a delay when loading a web page is guaranteed to lose visitors and therefore also potential customers. Testing and optimizing page speed is essential. Make use of the tools and techniques you can find on this website to optimize the performance of your website.

 

======================================

If you have ANY questions or need any help, please feel free to reach out by leaving a comment below!

ALSO, if you enjoyed this tutorial, please drop a THUMBS UP and a COMMENT letting me know!

======================================

 

Facebook Comments

how to use wordpress

 

Leave a Reply

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