Processing... Please wait...

Product was successfully added to your shopping cart.

Magento Performance Optimization - 7 steps to faster website

I have been doing magento performance optimization for quite a while. Goivvy.com helped www.sportula.com and www.surveillance-video.com and other eCommerce websites get better page loading times. So I know a few things.

Some speed optimization tweaks require extensive knowledge of magento platform. Others require no programming at all yet they are effective.


Magento Performance Tuning | Sportula.com Speed Score

Sportula.com Speed Score


This post brings together the field proven performance tuning techniques. You are free to skip steps that require extensive programming. Do your best with the easy ones and you will speed up your magento store.

This guide mainly target Magento 1.x. See how you can speed up Magento 2.


Magento Performance Optimization in 7 Steps


  1. Magento optimized hosting.
  2. Time to first byte audit.
  3. MySQL tuning.
  4. Full Page Cache.
  5. Varnish.
  6. PHP7.
  7. CDN.



First let us see why we should care about magento speed:


Why is Magento Slow?


It mostly happens due to wrong configuration and wrong choice of hosting provider. See Magento is not Shopify, you are not restricted on SKU numbers or anything like that but with great power comes great responsibilities. You do need the right hosting and if you are not tech savvy you do need a trustworthy magento programmer to help you along the way.

Another common problem - too many product attributes with too many choices. Adding color product attributes with just a few choices (black, white, green) would not hurt. Creating 10 product attributes with hundreds of choices would sure slow down magento website. Take a look here https://www.surveillance-video.com/dome-cameras/ . You can see Resolution product attribute with many choices as well as other multiple choices attributes. Without proper tuning it slows down magento website significantly.

Here is how to make magento website fast. Keep these steps in mind when you build your eCommerce store as well as when you run it.


1. Magento Optimised Hosting


Speed up magento with the right server provider. Get a decent hosting. Do a research, do not go cheap here. Hosting is the foundation of your eCommerce store. Lay a good foundation. Some hosting providers offer magento optimized solutions - check out Nexcess for example. (no they are not paying us:)

Shared or dedicated - it is really up to you to decide. In my experience i have seen many stores running pretty fast on shared servers.

Look for datacenter that is closest to your customers. You want to eliminate network issues.

I would consider choosing the right host as the most important advice. Build your eCommerce business on solid ground.


2. Reduce time to the first byte (TTFB)


TTFB is the measure of how quick your website responds to browser requests. In simple words it is the main speed parameter that tells you how fast your magento store is.

I wrote a tutorial on how to reduce TTFB step by step. There is a magento built in tool - Profiler - that lets us inspect what the platform does behind the scenes and tweak magento performance.

Good TTFB should be under 1s. You can use online tools like Pingdom to see what is your TTFB. If it is way over 1s - that is a sign that you should start reducing it.


3. Optimise MySQL database


First gather MySQL internal statistics with mysqltuner script. This awesome program tells you what is wrong with your database server and what needs fixing. It requires perl interpreter to be installed on the server.

Look for MySQL Table Cache Hit Rate (table_cache). If it says 0% - you are not using database table cache at all. MySQL Table Cache configuration lets DB keep tables in memory thus speeding up access to its data. Tweak table_cache parameter in my.cnf file to have table cache hit rate as close to 100% as possible.

Another setting to check is Table Open Cache (table_open_cache). That parameter greatly affects performance by making the same table available for different sessions.

I would advice you to get an expert in MySQL optimisation to check your database server. If you are on shared hosting you probably don't need to worry about database tuning - host team does it for you. If you run dedicated server either spend time learning MySQL configuration or get your DB configured by experts.


4. Enable Cache


4.1 Internal Magento Cache


This one is pretty easy. Magento has internal cache system. First make sure you enable cache at System > Cache Management.


Magento Performance Tuning | Magento Cache Management

Magento Cache Management

4.2 APC or Memcached


Second - tell your programmer to enable magento cache in app/etc/local.xml file. Go with APC or Memcached. Check if your hosting supports it.

APC and memcached cache session and other important data.


5. Full Page Cache (FPC) Extension


Spend a few bucks on it. Many would say that Cache != Performance and I agree. But FPC really works and it does speed up your magento store. Installation and setting up are mostly handled by the same vendor you buy FPC extension from.

Full Page Cache plugin stores the whole pages in cache. It reduces TTFB. It makes your eCommerce store literally lightning fast.

Magento Enterprise comes with full page cache already built in but do you need Magento Enterprise?


6. Install and configure Varnish


Varnish is a little program that caches parts of your webpage. Magento 2.0 supports Varnish out of the box. If you run Magento 1.x you would need a free extension by Nexcess - Turpentine. It is freely available on Magento Connect. Turpentine is used by many stores. It follows Varnish Cache Best Practices.

You should also make sure your host supports Varnish. If you run dedicated server you might need to install and configure Varnish daemon.

Test your varnish implementation before going live! Check if your cart block at the top updates. Check if it contains the products you added. Varnish might break your eCommerce store so give it a good test drive.


7. Content Delivery Network (CDN)


Magento Performance Tuning | CDN


Sign up for CDN. It is cheap. It does serve your static content (images, css/js files, video etc) faster than your host does. Companies to look for are MaxCDN, Cloudflare. Ask your host - maybe they offer CDN services as well.


Why Should I Care


Speed is important. It affects your Google Rankings. It makes checkout less irritating. Nobody wants to wait especially when buying on the internet.

The 7 magento performance tips will make your online store fast. It will attract more potential customers.


Other articles you might be interested in:

  1. How to send Telegram phone alarms with PHP script for dummies
  2. Magento Full Page Cache
  3. Optimize Magento to get 100% Google Page Speed
  4. Remove Powered by Webforms note in footer
  5. Apply custom formula to the product price


Our Magento extensions you might be interested in:


If you find this post interesting do not hesitate to sign up for our newsletter and join the 853 people who receive Magento news, tips and tricks regularly.

Thank You!



4 thoughts on “Magento Performance Optimization - 7 steps to faster website”