A significant number of schools are using Joomla as the basis for their school web site and it has come to the notice of the SWGfL that the performance of these web sites is not as good as it could be. The SWGfL has investigated the issues and has come up with the following two recommendations for improving performance:
- Add extra table indexes to improve the database performance;
- Turning on caching in Joomla.
Joomla performance tuning and recommendations
1. Add extra table indexes to the Joomla database:
Joomla driven websites can run intensive database queries, the SWGfL recommends adding additional INDEXES to databases so data extraction will be less resource intensive and websites will load quicker. It may be worth checking that you have enough space available to store the indexes.
- load PhpMyAdmin for your website;
- In left panel, click database name;
- Click "SQL" tab in right panel:

- Copy and paste following queries into the textbox:
ALTER TABLE `jos_categories` ADD INDEX `title_id` (`title`,`id`);
ALTER TABLE `jos_components` ADD INDEX `opt_par_id` (`option`, `parent`, `id`);
ALTER TABLE `jos_components` ADD INDEX `admin_opt` (`admin_menu_link`, `option`);
ALTER TABLE `jos_content` ADD INDEX `state_access_created` ( `state` , `access` , `publish_up` , `publish_down` , `id` , `catid` , `sectionid` , `created_by` );
ALTER TABLE `jos_core_acl_aro_groups` ADD INDEX `name_lft_rgt` (`name`, `lft`, `rgt`);
ALTER TABLE `jos_menu` ADD INDEX `link_id` (`link`(30), `id`);
ALTER TABLE `jos_menu` ADD INDEX `link_pub_id` (`link`(30), `published`, `id`);
ALTER TABLE `jos_sections` ADD INDEX `id_acc_pub` (`id`, `access`, `published`, `name`(20));
ALTER TABLE `jos_sections` ADD INDEX `pub_acc_id` (`published`,`access`,`id`,`name`(20));
ALTER TABLE `jos_stats_agents` ADD INDEX `agent_type` (`agent`,`type`,`hits`);
ALTER TABLE `jos_templates_menu` ADD INDEX `client_menu` (`client_id`, `menuid`, `template`);
ALTER TABLE `jos_users` ADD INDEX `user_pass_id` (`username`,`password`,`id`);
- Click "Go":

- Additional indexes are now active.
2. Turn on Caching in Joomla:
Joomla internal caching allows the caching of data and avoid duplicated SQL queries to the backend databases. It also allows static content to be cached onto the disk which in result improves website performance. It is recommended to turn internal caching ON
- Please make sure your httpdocs/cache directory is writeable
- Load Joomla administration panel and log in as "admin"
- Click on "Global Configuration" icon to load up system settings:

- Select "System" from top pane
- Set "Cache Settings" to Yes and leave "Cache Time" to default 15 minutes:

- Joomla internal caching is now enabled.
Published: 22/07/2010 09:53:10