wordpress

Gzip compression in WordPress without plugins

Do you use WordPress? Gzip compression helps reduce the size of your pages' content. By compressing you will greatly increase the speed of your WordPress website and reduce the use of bandwidth on your server.Wordpress

Google reports that web page sizes can be reduced by as much as 70% to the correct use of gzip compression.

Of course there are such as W3 Total Cache or Super Cache which enable you to gzipped your files. So you won't need to modify it .htaccess manually.

In this post we will show how Gzip is done through the .htaccess file as every plugin you use in your WordPress, in addition to the useful function it offers, also burdens your site.

So instead of installing caching plugins, you can enable Gzip compression by modifying the .htaccess file located in your WP root.

Beware of editing the .htaccess file, do not use Windows text editors. Download and install it for free notepad + +

Open the .htaccess and add the following code:


    
        
            SetEnvIfNoCase ^ (Accept-EncodXng | X-cept-Encoding | X {15} | ~ {15} | - {15}) $ ^ ((gzip | deflate) \ s *,? \ S *) + | [[X ~ -] {4,13} $ HAVE_Accept-Encoding RequestHeader append Accept-Encoding "gzip, deflate" env = HAVE_Accept-Encoding
        
    

    
        AddOutputFilterByType DEFLATE application / atom + xml \ application / javascript \ application / json \ application / ld + json \ application / rss + xml \ application / vnd.ms-fontobject \ application / x-font-ttf \ application / x-web- app-manifest + json \ application / xhtml + xml \ application / xml \ font / opentype \ image / svg + xml \ image / x-icon \ text / css \ text / html \ text / plain / text \ text / x-component \ text / xml
    

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).