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
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
#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
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.*
#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.
ob_start("ob_gzhandler"); ?>