Magento eCommerce: Flexible, Customizable and Now Faster

Magento was built to be the most customizable ecommerce system possible; however the qualities that make Magento so accommodating can potentially cause some performance concerns. It’s important to configure Magento for the best performance in your environment. With a few minor tweaks, faster page loads can be attained as well as increased overall performance and speed. Performance optimization adjustments are grouped into two categories below: Basic and Advanced.

Basic Optimization

Changing a few settings in the Magento Admin Panel and implementing other common optimizing techniques will make a significant improvement in performance.

  1. Optimize and compress images

    Use image compression tools such as browser based Smush.it, or for Mac users, I recommend imageOptim. In addition, CSS Sprites allows you to combine an assortment of images into one image file. Each image within the file is called utilizing CSS classes for placement. This has the benefit of cutting down on HTTP requests and reducing page load times.

  2. Minify your CSS and JS files

    By minifying these files, you are stripping out unnecessary whitespace and characters to speed up download times. Merging multiple CSS and JS files into one file will cut down on HTTP requests and server load, thus speeding up page load.

    Merging files can be done via the Magento Admin. Go to System > Configuration > Developer. There you will see JavaScript Settings and CSS Settings. Under JavaScript Settings, change Merge JavaScript Files to Yes. Do the same for CSS Settings. Click Save Config and make sure you clear the cache when you are done.

    There are also several Magento Modules that will compress and minify for you, such as Fooman Speedster and JS/CSS Compression & Minify.

  3. Enable Flat Catalogs for smaller Magento stores

    By enabling Flat Catalogs, you are changing the database structure from a more complex EAV (Entity–attribute–value model) structure using multiple tables, to a flat structure utilizing one large table. Doing this saves time during SQL queries when serving up pages and is recommended for improved performance of your Magento store.

  4. Enable Magento Caching

    In the Magento Admin Panel, under Cache Management, enable caching if it is not already.

  5. Disable Magento logging

    You can disable logging in the System > Configuration > Developer > Log Settings. This is usually disabled by default.

  6. Disable unneeded Magento modules

    Disabling unused modules uses fewer resources. You can disable modules through Magento Admin at System > Configuration > Advanced > Disable modules output. Be sure to disable only those modules you are certain are not in use.

  7. Use the Magento Compiler

    Once you have completed development, using the Magento Compiler will reduce execution time as well as cache the most frequently used pages. When you need to do more development, such as making upgrades to modules, etc., be sure to disable the compiler.

Advanced Optimization

For more advanced settings changes, updates to the .htaccess file created when Magento is installed will provide additional performance benefits. This .htaccess file can be found in the root directory of your Magento store.(Example: If Magento is installed in the directory public_html/store then the .htaccess file will be found at public_html/store/.htaccess)

  1. Enable output compression

    Save bandwidth by compressing all file output by changing lines 74-100 of the .htaccess file. Uncomment the relevant code so that it resembles the following:

    <IfModule mod_deflate.c>
    ############################################
    ## 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

    # 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

    </IfModule>

  2. Enable Expires Headers

    This setting determines how long a component can be cached by the browser. Make sure line 187 is uncommented and add a line just above it as shown below:

    <IfModule mod_expires.c>
    ############################################
    ## Add default Expires header
    ## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresActive On
    ExpiresDefault "access plus 1 year"

    </IfModule>

Now your Magento installation is set for performance and speed. By following these simple settings changes, Magento can not only be a flexible ecommerce choice, but also a fast loading one.

Lunarpages offers Magento through our easy-to-install web scripts found in the Softaculous section of your control panel. If you are not yet set up with a web hosting account, select one of the following web hosting plan types to get started today:

ABOUT THIS CONTRIBUTOR
Back to top