If you feel this tip has saved you time or effort, please consider buying us a cuppa coffee to keep things going!
Speed up Joomla
Generally Joomla sites are not well optimized for fast load times. The main performance increases can be made by:
-
Making fewer HTTP requests
-
Add Expires headers
-
Put JavaScript at bottom
-
Configure entity tags (ETags)
-
Compress components with gzip
-
Enable Joomla Cache
You can speed up your page loading times in Joomla by using the following tips:
Joomla Enable GZip Compression
By enabling GZIP compression, you can reduce the number of HTTP requests, remove white space from your code and reduce the file size of the page elements. There are two things you have to do to fully enable gzip compression in Joomla:
Download & install the RokGzipper plug-in from here: http://www.rockettheme.com/extensions-downloads/club/1009-rokgzipper
This plug-in will combine and gzip your js and css files, reducing the amount of http requests, and reducing the size of the requested files.
Enabling the GZIP compression in the administration page will allow gzipping of the html elements. To do this, log into the administration page.
Click Site -> Global Configuration. Click the Server page. Choose GZIP Page Compression: Yes
Update to the latest version
Updating to the latest Joomla version can improve performace. The latest version of Joomla 1.5 at time of writing is 1.5.26. This can be downloaded from here: http://www.joomla.org/download.html
Joomla Enable Cache
Joomla builds each page on-the-fly by making many database queries and file accesses. For sites that do not change very often, you can enable the Caching system so pages are temporarily stored on the sever as complete pages, without needed to be re-created every time the page is requested. To enable the Joomla Cache:
Log in to the administrator page
Click Site -> Global Configuration. Click the Server page. In the Cache Settings section choose:
-
Cache: Yes
-
Cache Time: 1440 minutes (this is 1 day - choose a cache time that is appropriate for how often your site is updated.) You can manually purge the cache if you need to see changes appear on your site immediately. To purge the cache: Choose Tools -> Clean Cache.
Click Extensions -> Plugin Manager. Click the system - cache plugin and enable it. I also set the cache lifetime to 1400 seconds (one day).
Joomla Add Expire Headers
Joomla does not automatically add expire headers, so the browser has trouble working out if it should cache the pages or not. Enabling Expire Headers allows the browser to better cache the pages.
Download and install the plug-in from here: http://www.richeyweb.com/development/joomla-plugins/66-expires-headers
Leave the default options in the plug-in and then enable it. This plug-in adds headers for pages, but cannot add them for images, javascript or css files.
To overcome this, add the following file code block to the .htaccess file in the root of your joomla installation:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Wed, 15 Apr 2020 20:00:00 GMT"
Header set Cache-Control "public"
</FilesMatch>
Joomla Remove ETags
ETags allow the browser to properly use it's local cache, if incorrectly set, the browser may not use the cache and re-request files. To overcome this, add the following code block to your .htaccess file:
#Header unset ETag
FileETag none
References
http://www.richeyweb.com/development/joomla-plugins/66-expires-headers
http://www.rockettheme.com/extensions-downloads/club/1009-rokgzipper
http://www.joomla.org/download.html
http://forum.joomla.org/viewtopic.php?p=2433861
http://www.theartofjoomla.com/joomla-caching-explained.html
|
Comments
My website uses a recent template by yoothemes which as a combination, minify and compression feature for the template, javascript and css files and it works great. Shaved off over 4 seconds off load time and almost halved my first byte time to .932 seconds. Pretty impressive stuff.
I have a question regarding the gzip compression in the administrator settings.
When you say "Enabling the GZIP compression in the administration page will allow gzipping of the html elements." which html elements are you referring to (frontend/backend)?
I haven't been able to test the gzip compression in joomla admin settings because when I enable it I get an error 330. I think it's something to do with my host server.
RSS feed for comments to this post