Book Image

Instant Magento Performance Optimization How-to

By : Nayrolles Mathieu (USD), Mathieu Nayrolles
Book Image

Instant Magento Performance Optimization How-to

By: Nayrolles Mathieu (USD), Mathieu Nayrolles

Overview of this book

The optimization of an attractive commercial website is a non-trivial task that demands time and knowledge. Optimization is a critical point for all growing businesses because a misconfiguration could make you lose money, a lot of money. If your server is overloaded, a browser that wants to turn into a buyer will not be able to, and you will lose customers. "Instant Magento Performance Optimization How-To" is a practical, hands-on guide that provides you with a number of clear, step-by-step exercises to help you reach a high performance level for your Magento stores and keep your customers satisfied.This book looks at tweaks and tips used to boost your Magento Performance, and breaks down the confusion that surrounds the subject.You will learn how to compress your pages, styles, and scripts by almost 80%. We will also take a look at controversial optimization settings such as Magento core compilation or enabling all caching systems. You will discover new applications that improve performance. If you wish your e-businesses to grow and want to keep your customers satisfied, you definitely need this book.
Table of Contents (7 chapters)

Chapter 1. Instant Magento Performance Optimization How-to

Welcome to Instant Magento Performance Optimization How-to. This book will teach you how to turn your online business into a high performance money-making machine by saving you a huge amount of time in online research and unsuccessful attempts.

This book covers all the most popular best practices that can be applied for speeding up your Magento. All tricks and tips shown in this book come with the Magento backend, therefore you don't need to be a Magento expert, or even a master user, to apply them on your website.

All the experiments shown in this book have been released with the latest Magento Community Edition (Version, at the time of writing) setup and the Sample Data provided by Magento Inc. (Version The displayed results are provided by different tools, but the main ones are Pingdom tools, Mozilla Firebug, Google Speed Tracer, and Google PageSpeed.

The results are shown in terms of seconds and milliseconds (1 second = 1000 milliseconds), kiloctet (1 megaoctet = 1000 kiloctet and 1000 megaoctet = 1 gigaoctet), and the number of requests. The number of requests represent the amount of files your future customer's browser has to retrieve from your Magento website.

We recommend that you follow our experiments step-by-step. In which case, you should prepare a copy of your current Magento store or set up the same test subject that we did.

First, we would like to introduce you to the measures of performance that will be used throughout the book. The results that you can see in the following table are the ones before any tweaking is done. These come from our test subject, which refers to a classic installation.



Load time




2.58 seconds

724.3 KB



107 milliseconds

100.6 KB



742 milliseconds

363.4 KB

As you can see, our website is fully loaded in 2.58 seconds and 49 requests. This length of time is unacceptable when there is a unique user on our website.

Can you imagine the loading time if 10 or 100 users are trying to access your website at the same time? Forty-nine requests also seem disproportionate for only loading the home page.

In this section, we will play with five common settings to accelerate your business, CSS and JavaScript merging, log, compilation, and indexing. For each new task, we will turn off the previous settings in order to clearly identify what the bonuses are for each one.

Before tweaking your Magento, you should do a little work. These are not Magento specifics but general web optimization practices:

  • Get a dedicated server: Most of the hosting enterprises will gather your website with hundreds of others. If you are on a mutual hosting platform, your performance will depend on other websites' traffic.

  • Hosting country: Choose a hosting company that owns servers in the country where your customers are, and not necessarily the best ones in the market.

  • Versions: Always update your servers with the latest versions, with updated versions come features, security, and performance.

  • Images: Always rasterize your images to the size you want them to be displayed and crop all white spaces. Go for PNG or GIF files instead of JPG files.

  • Extensions and modules: Disable any extensions or modules that you don't use.