Enabling Compression on a Apache (Hostmonster) Joomla Website

Enabling Compression on a Apache (Hostmonster) Joomla Website

Edit php.ini so that the following lines read as follws (you only need ot change the first one on a Hostmonster site):

{code lang:ini showtitle:false lines:false hidden:false}output_handler = ob_gzhandler
zlib.output_compression = Off
;zlib.output_compression_level = -1{/code}

Add the following to the htaccess:

{code lang:ini showtitle:false lines:false hidden:false}
<IfModule mod.gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(js|css|html|php)$
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>

AddEncoding gzip .gz

<Files *.css.gz>
ForceType text/css
Header set Content-Encoding: gzip
</Files>

<Files *.js.gz>
ForceType text/javascript
Header set Content-Encoding: gzip
</Files>{/code}

Confirm compression is working using the following website: http://www.gidnetwork.com/tools/gzip-test.php

Joomla : Improve Site Performance

Joomla : Improve Site Performance

1) Enable Joomla Site Caching

Open the Joomla Administrator, select the Site menu, then Global Configuration, then System. I’ve configured caching with a 15 minute cache life.

For sites with data which changes infrequently, use a higher time.

2) Enable Apache PHP/HTML compression

Edit the .htaccess file in the root of your Joomla Website, modify the IfModule mod_php4.c section to include the line ‘php_flag zlib.output_compression on’ – for example:

php_value max_execution_time      120
php_flag zlib.output_compression on