Joomla 2.5 – How to disable MooTools

If you’re looking for a quick and easy way to reduce the size of your Joomla 2.5 pages – this may just be your answer!

By default Joomla 2.5 comes with MooTools integrated through the core system files. For some websites (and templates) this is helpful, for others it’s unused and unnecessarily bloating the size of each and every page load by 400 KB!

For high traffic websites 400 KB each page load soon adds up to some serious traffic – so removing this may just be worth the risk.

Note: some Joomla features and templates rely on MooTools and will assume it is running. As with any system change – TEST! If it breaks an important feature you can simply undo the changes.

Here’s the quick and easy way of disabling MooTools:

 

  1. Log into your Joomla Administration page
  2. Hover over the ‘Extensions’ tab then click on ‘Template Manager’
  3. Click on ‘Templates’
  4. Joomla25-DisableMooTools1
  5. Open your template
  6. Under ‘Template Master Files’ click on ‘Edit mail page template’
  7. Joomla25-DisableMooTools2
  8. Under the ‘define( ‘YOURBASEPATH’, dirname(__FILE__) );’ paste in the following code
  9. unset($this->_scripts[JURI::root(true).'/media/system/js/caption.js']);
    unset($this->_scripts[JURI::root(true).'/media/system/js/mootools-core.js']);
    unset($this->_scripts[JURI::root(true).'/media/system/js/mootools-more.js']);
  10. Joomla25-DisableMooTools3
  11. Click ‘Save & Close’ to save the changes.
  12. TEST! – Test your website, ensure pages load, menus work, links work, pictures work etc!