• Resolved Sai Praveen

    (@saip1540)


    Hi Everyone

    I have a query how can I enable gzip compression on website which is hosted in godaddy. Any suggestion you have do i need to ask them or can I enable using code as well.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @saip1540
    Please read this for ?enable gzip compression
    https://www.wpbeginner.com/wp-tutorials/how-to-enable-gzip-compression-in-wordpress/

    OR

    1. Log in to Dashboard/cPanel of your website.
    2. Open .htaccess file (or config file in Nginx).
    3. Paste the corresponding code (given below) based on server type i.e. Apache or Nginx.
    4. Save changes and you’re done.
    5. Now check your site on compression testing tools again. It will definitely reduce your website page size significantly and will increase page-load speed.
    # BEGIN GZIP COMPRESSION
    <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 GZIP COMPRESSION

    It seems you’re using the NitroPack caching plugin, which has this feature built-in, so you can simply tick the checkbox in the plugin to turn this on.

    Here’s their support article to turn on compression: https://support.nitropack.io/hc/en-us/articles/13229297479313-Enabling-GZIP-compression

    Good luck!

    • This reply was modified 1 year, 3 months ago by George Appiah. Reason: Remove options already suggested by another contributor
    Moderator Yui

    (@fierevere)

    永子

    Your hosting runs nginx it should handle gzip or brotli compression by itself, if configured in nginx.conf by server system administrator.

    Please note, that using double compression on nginx side and before nginx will result in garbage displayed in visitor’s browser

    You can add below code in htaccess file.

    # BEGIN GZIP COMPRESSION
    <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 GZIP COMPRESSION

    • This reply was modified 1 year, 3 months ago by prakash117.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Speed Optimization Related query’ is closed to new replies.