Mobile app version of vmapp.org
Login or Join
Sent6035632

: Enable gzip compression On Worpress Hosted on Godaddy 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

@Sent6035632

Posted in: #Godaddy #Htaccess #Wordpress

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 load my website and open the .htaccess file again the file content becomes as reset to 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 plan is Deluxe Classic Hosting Linux.

Edit:

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

But this was for short time, after few minutes the .htaccss file revert to it's original content.

Can any one give what can be the issue?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sent6035632

1 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

GoDaddy by default enables mod_deflate and globally sets the compression types on all packages purchased in the last few years. Only classic accounts require manual intervention.


SOURCE

Our Linux Web Hosting hosting accounts have mod_deflate enabled by
default. This compresses all text type files requested from it. You
can disable mod_deflate on a per-directory basis and it applies
recursively. You can place the following in a .htaccess file to
disable mod_deflate:

SetEnvIf Request_URI .* no-gzip=1

Classic

Our Classic Hosting accounts do not enable mod_deflate at the global
level, but you can enable it in your .htaccess file.


It's always best practice to contact your host first, if they are no help then your with the wrong provider, also just so you know, not all hosts require <IfModule>, so if you are on a classic account remove the <ifmodule mod_deflate.c> as GoDaddy does not mention it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme