Performance issues with Magento are extremely common. With a lot of research and personal experience, my conclusion is that while there are no magic bullets, there are some helpful practices to speed things up.

I have nothing against the do-it-all plugins such as Fooman Speedster, but I’ve often times had issues with these solutions. If they work for you, use them. If they don’t, I’d suggest doing some work on your own.


First, and by far the most helpful in my experience, is making sure you are compressing your resources. To do this, open your .htaccess file in the root directory of your Magento site and add the following:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

This will allow for compression on all your pages as well as set the cache expirations.


Make sure you turn on caching under System -> Cache Management. This will be extraordinarily helpful.


Minifying and combining your CSS and JS files will also make a huge difference, especially if you are delivering to mobile devices. You can do this in Magento by going to System -> Configuration -> Javascript Settings and System -> Configuration -> CSS Settings. BE CAREFFUL with this. The risk is primarily with the JS files. Very often when you combine these files they will start throwing errors.

If you find that errors are being thrown when you combine JS files, I have a follow up procedure for you.

If you are loading your custom JS through the page.xml file (or any other xml file), remove them from there and add them manually to your head.phtml file (or footer.phtml, to load your custom JS last, which is best practice). This way when you turn on the compression in Magento, your custom JS will not be included.

Manually combine and minify your files.

If you can, combine all your JS into one file and minify it using a tool such as Minify Javascript Compression Tool.

The end result here will be only two combined javascript files, instead of the 15 you might have otherwise. This will do lots for speed without causing the errors you might get when you try to automate the entire process.

If you decide to load your custom JS last (in footer.phtml) you should remember that you can’t do that with the Magento default JS files, as Magento is riddled with inline JS that is dependent on the files loaded in the header.

PHP Settings

Change your PHP memory settings. In your php.ini file you should find the line starting with “memory_limit”. Change it to at least 512M as follow:

memory_limit = 512M

I’d also suggest changing your max_execution_time.

max_execution_time = 1800

If you can’t access php.ini you change these in your .htaccess file as follows:

php_value memory_limit 512M php_value max_execution_time 18000



Compile your Magento files! Go to System -> Tools -> Compilation and click “Run Compilation Process.” This can be a resource intensive process, so be aware of that before moving forward. This will let Magento pull all of its resources from one place and should noticeably improve the speed. Be aware that installing modules after compiling will likely require a new compile to get them installed properly.

These little tips should help speed up your site pretty significantly and can be done by an average developer without huge knowledge of server configuration and MySQL configuration. I hope this is helpful!