Shortlink:

Magento optimization

Magento OptimizationMagento optimization – There are several steps you might consider in order to improve your Magento website performance. Based on our experience we can recommend the following points to optimize your Magento store.

It is a good idea to keep your Magento application up to date. New releases usually include performance improvements and other patches that can greatly reduce your Magento website loading speed.

This guide demonstrates how to optimize Magento performance. Most optimizations will work with any version of Magento. Those intended for specific versions will be indicated as such.

Enable Magento Output Compression

This section will turn on the apache mod_deflate module, which compresses text, css, and javascript before it is sent to the browser. This results in a smaller download size. To enable, simply uncomment the appropriate lines so that it looks like the following:

[php]
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter on all content
SetOutputFilter DEFLATE
# Insert filter on selected content types only
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript

# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

# Don’t compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary
[/php]

Magento Enable Expires Headers

Browsers use Expires headers to determine how long a page component can be cached. Static components, like images, should have far-future expires headers, but truthfully, all page components should have expires headers. To turn this feature on, just uncomment the appropriate line and add “ExpiresActive On” right above it. See below:

[php]
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

ExpiresActive On
ExpiresDefault "access plus 1 year"
[/php]

Keep in mind, if you use a far future Expires header you have to change the component’s filename whenever the component changes. More info http://developer.yahoo.com/performance/rules.html

Disable ETags

ETags are a way for browsers to validate cached components across subsequent visits. They can slow down a site served from a cluster if the cluster hasn’t implemented them properly. It is best to just turn them off as follows:

[php]
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags

FileETag none
[/php]

Now, from Magento admin side make sure that you combine JS and CSS files.

  • Magento admin -> System Configuration -> Developer -> Under “Javascript Settings”, change “Merge Javascript Files” to YES.
  • Magento admin -> System Configuration -> Developer -> Under “CSS Settings”, change “Merge CSS Files” to YES

Clear Magento cache.

Use CDN if it is possible, please note combining CSS/JS when using CDN will cause CSS/JS to “break” until the CDN updates completely.

Enable Magento Flat Catalog

If your Magento store has a large number of products you might consider enabling the Flat Catalog module for products and categories. Magento uses the EAV model to store customer and product data. This enables these objects to be incredibly extensible, but results in longer SQL queries and more reads. Enabling the Flat Catalog for Categories and Products merges product data into one table, thereby improving performance. Generally, all stores should enable Flat Catalog for Categories.

This can be done via your Magento Admin panel -> Configuration -> Catalog

LATEST BLOG POST

SEO for Magento
SEO for Magento - It’s well known that, as far as e-commerce platforms go, Magento is one of the most search-engine friendly systems. To make an e-store more visible to potential buyers, there are many techniques within Magento that a website …]
Magento optimization
Magento optimization - There are several steps you might consider in order to improve your Magento website performance. Based on our experience we can recommend the following points to optimize your Magento store. It is a good idea to keep …]
Online Marketing, SEO and SEM
Online Marketing, SEO and SEM - Are you so laser focused on achieving the top positions for your keywords in the search engines that you are overlooking what happens when you get there? In general, search engine optimization tends to …]
Posted in Magento SEO - Magento Website Optimisation Tagged with: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*