wordpress

Gzip compression in WordPress without plugins

Are you using WordPress? The co gzip helps reduce the content size of your pages. By compressing you will significantly increase the speed of your WordPress website and reduce the bandwidth usage 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 plugins like W3 Total Cache or Super Cache that allow you to gzipping your files. So you will not need to modify the .htaccess file manually.

In this publication we'll show you how to make Gzip compression through the .htaccess file as each plugin you use in your WordPress, in addition to the useful functionality it offers, adds to your site.

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

Be careful not to use text when editing the .htaccess file of . Download and install the free app 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 /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/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.).