I thought Magento came with this feature out of the box but it doesn't appear to be working at all. I'm not sure if I haven't set it up properly, but right now I'm resorting to using cat and altering the page.xml layout file to use the combined javascript and css files.

Can I make Magento do this instead or is there an extension that adds this feature?

(duplicate of https://stackoverflow.com/questions/4236381/is-there-a-magento-extension-for-combining-compressing-javascript-and-css)

3 Answers 3


The quickest thing I can think of is Google's mod_pagespeed for Apache. I've used it on my Magento store and didn't have any issues with the combination of the JS and CSS, though did run into some issues with the caching and what have you, but you can turn those off pretty easily.

With mod_pagespeed, you want to use these filters in you pagespeed.conf:

# Combine CSS
ModPagespeedEnableFilters combine_css
# Minify Javascript
ModPagespeedEnableFilters rewrite_javascript

Also, check out the .htaccess file in Paul Irish's HTML5 Boilerplate. He outlines how to combine certain JS files. You don't want to combine all Javascript into one file, becaue there might be times when you want JS to run in a certain order.


May the extention help you https://www.magentocommerce.com/magento-connect/fooman-speedster.html

  • downvoted, there's no point posting as a new answer, just edit the other post to include the correct URL...
    – user2821
    Commented Oct 14, 2011 at 16:31

So far the Magento module method of doing this is using Fooman Speedster. It merges and minifies your Javascript and CSS fils, typically merging everything into two JS files and two CSS files. I've had issues using Magento's built-in JS/CSS merge so I abandoned it for the module. The developer keeps it up to date and it works with versions 1.2 though 1.6. Free.


It requires mod_rewrite to be enabled and .htaccess support. Installation of Yoast's Canonical Urls extension or the Mxperts jQuery Base extension will break the extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.