• Hi, I am just a bignner on worpress,

    I have a site hosted on Godaddy, I need to enable gzip compression on my website as it recommended on speed test, and I have added below content to .htaccess

    # BEGIN GZIP
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
    </ifmodule>
    # END GZIP

    My final htaccess look like

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # BEGIN GZIP
    <ifmodule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
    </ifmodule>
    # END GZIP

    But when I loade my website and open the .htaccess file again the file content becomes as initial, like,

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    My godaddy hosting belongs to Deluxe Classic Hosting Linux.

    Thanks for your support….

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Haris

    (@haris_wp)

    I got it working by stopping all system process on godaddy, then edit again the .htaccess file resolved the issue.

    Thread Starter Haris

    (@haris_wp)

    Sorry after few munutes the .htaccess file revert back to it’s initial content. What can be the issue.

    Maybe there is a plugin that is rewriting your htaccess? Deactivate all plugins and see what happens.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Enable gzip compression On Worpress Hosted on Godaddy’ is closed to new replies.