After a recent Magento build for a client we were asked the age old problem “My site is running slow for visitors how can we speed this up?”
It’s actually not as complex as you might think to quickly speed up magento without having to do any massive code changes. Other than the obvious stuff like:
- Host on a dedicated server (if your using a shared server)
- Use a heavyweight memory caching system like Memcache
- Use CSS Sprites for all the smaller images across the site
There are some much simpler things to do. First off you are best off installing something like YSlow so you can actually measure / monitor your site performance rather than guessing. After you’ve installed YSlow you can run a page analysis and get a more detailed idea of what need to be improved.
Try doing the follow to improve the speed:
- Go to your Magento store admin, then go to: System > Cache Management and make sure you have everything enabled.
Because you are merging files here, on the odd occasion this can cause some slight hiccups, so do give your site a once over after doing this
- Copy off your .htaccess file from root level of your server. You can do this via an FTP application. Once open, there are a few things you can uncomment to speed things up.
Find the follow snippets of code and uncomment so they appear as they do in the boxes below. This will enable GZIP compression. You can read more about it here.
## enable resulting html compression php_flag zlib.output_compression on
- Enable Header expires, so your browser will cache assets for a set period of time before flushing them. Items will automatically re-cache if you edit / clear your browser cache.
## Add default Expires header ## http://developer.yahoo.com/performance/rules.html#expires ExpiresActive On ExpiresDefault "access plus 1 month"
- Disable ETags, removing the ETag reduces the size of the HTTP headers in both the response and subsequent requests. Further reading can be found here.
## If running in cluster environment, uncomment this ## http://developer.yahoo.com/performance/rules.html#etags FileETag none
Just doing those 5 simple steps will greatly improve the speed of your Magento store. Be sure to make a backup of your .htaccess before making any changes (just in-case).