I have setup multi-store magento website, also added full page caching plugin to speedup performance in front-end but still front-end is very slow.

Some reason I figured out from my analysis :

1) TTFB : time to first byte is 2-10 seconds in my magento front-end, as shown in below figure :

enter image description here

2) MySQL query execution time is 4-5 seconds : when I execute any simple query direct in my MySQL database then it return response in 4-5 seconds in first time, that's why any ajax taking time and return response in 4-5 seconds. My MySql setting shown as below :

enter image description here

Please suggest what will I do to improve magento site performance?

  • 1
    install Aoe_Profiler and check your slow parts
    – MagenX
    Apr 11, 2017 at 6:57
  • I installed Aoe_Profiler from here github.com/AOEpeople/Aoe_Profiler but it is not working. Apr 11, 2017 at 7:42
  • You could also use New Relic to find slow running queries or processes. Did you try to restart MySQL? Could be that one very slow running query is blocking the others, a restart might fix this.
    – Niels
    Apr 11, 2017 at 9:05
  • But the site is on production server, Sholud I do restart mysql? Apr 11, 2017 at 9:42
  • You can use full page cache. There are few extension available to do so.
    – inrsaurabh
    Apr 16, 2017 at 14:21

9 Answers 9


For Improve you site performance and speed.Follow below points

  • Merge Javascript and CSS Files and remove unnecessary CSS and js files
  • Uninstall Irrelevant Extensions
  • Enable Caching
  • Choose a Fast Web Hosting
  • Set up a Content Delivery Network (CDN)
  • Optimize Images on Your Magento Store
  • Update to the Latest Magento Version
  • Use Lightweight Magento Themes
  • Clean Database Logs
  • Update Indexers
  • Enable Flat Categories and Products

Here is a what I would do in your case:

  1. Install the latest Magento 1.9 on your server to benchmark against. Load it with sample data and compare its speed to the speed of your mult-store installation. If the default M1.9 is significantly faster than your custom site than go to #2 if speed is almost the same contact your hosting or pick another server/hosting - yours is simply not enough for Magento.

  2. Now you know your hosting is OK and it is either a custom extension or a custom template slowing you down. I saw you couldn't install Aoe profiler - give it another try and make it work. It will show you what part of your code is slow. If you can't install it go to step #3.

  3. Disable all of your custom extensions. If speed goes up then you know that it is one of your 3rd party plugins that is the problem. Enable them one by one and find it. Once found contact it's vendor or simply find an alternative. If disabling all plugins has no effect change your custom theme to default rwd theme. Does it help? Then it is your theme and you should contact the vendor who sold (developed) it for you.

Hope you find the bottleneck.

In my personal experience it is most probably a poorly coded 3rd party extension observer that is executed on every page request and making things slow.


An ecommerce store is full of images and banners for obvious reasons. To make sure that the images aren’t affecting your site’s performance, optimize them accordingly. The images that appear on the main site should be compressed for less data usage and easy page loads. While the product images should be in JPEG format, PNG and SVG format is recommended for logo and layout of your Magento 2 site.

One of the problems identified in the slowdown of Magento 2 sites had been the read speed of the database. If your Magento 2 store has a wide range of products, you are likely to face this problem more. To increase the read speed of your database, you should enable flat categories and products. By doing this, you can minimize the number of database joins done when it shows the products. It leads to the reduction of MySQL query complexity and your site’s performance is improved. To change the settings, you can go to your backend settings, select ‘catalog’ from the ‘configuration’ header, and mark ‘Yes’ for the ‘Use Flat Catalog Category’.

  1. Enable Flat catalog
  2. SSD
  3. Enable cache
  4. Redis for cache
  5. PHP7
  6. Mysql - latest version
  7. Also, check your custom extensions - maybe some process of event/observer stopped Magento

also, take a look, if category include a lot of products > 500 this category page will be slow

for Magento better category with no much products Layer navigation - really slow.


To improve Magento site :

  1. Enable Gzip compression
  2. Merge JS & Css
  3. add Expire geader
  4. optimize all images
  5. aviod 404 (not found) error
  6. minify js , Css & html 7.Enable cache 8.Enable Flat catalog

To speed up your magento installation, you must follow the steps given below.

  1. Measure your website performance at gtmetrix.com or tools.pingdom.com.
  2. Step 1 will give you ranking and issue that might exist in your code base.
  3. Follow page speed guidelines given in the step 2.
  4. mostly things are taken care by .htaccess located at magento root folder.
  5. in .htaccess few things to consider. enable compression using mod_deflate, enable expiry header using mod_headers and mod_expires. Code can be found on Google.
  6. Disable magento cache.
  7. Merge CSS and JS and minify them. Do Minify HTML.
  8. Enable Cache again.

As you have mentioned, 1st response is slow then contact your hosting provider for the same. It might be issue for slow performance if above step does not solve it.

You can enable Varnish Cache too.


Follow these tips to improve your Magento performance:

  • Install and Configure Varnish Cache

  • Merge JS and CSS Files

  • Caching Magento

  • Optimize Images

  • Flat Catalog Categories and Products


Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve performance of your Magento 2 site. If you have a Magento 2 site, the following tips to speed up magento site.

  1. Server requirement and configuration
  2. Optimize Images
  3. Enable Flat Catalogue
  4. Optimize JS and CSS files
  5. Choose the right Content Delivery Network
  6. Set off Code Generation
  7. Use Full Page Cache.

There are two ways, the hard way which is cheap and time consuming, or the easy way which is expensive an fast, everyone will have already explained the hard way, we use the easy way. This works by using Ceph Clusters, now in theory it should not make much difference but it does.

Magento Cluster Hosting

We get 95% on category pages and 97% on product pages, WordPress gets 99% on pages and those are without anything like CDN, Magento hosting is intensely complicated for performance especially when you are dealing with 10,000s to 100,000s of products which we do.

Obviously you can tweak things on your site but often when you fix one thing it breaks something else, we didn't like that idea especially for those using split/share clusters for Google to index and rank, we usually have to place crawl delays because Google tries to destroy the cluster with its indexing requests, a luxury problem very few have.

Varnish is always the go to solution but the standard configuration everyone uses slows down Google indexing, we use a different approach and then switch over once the site is 80% indexed from zero usually within a month or two, everything everyone says here is completely valid, but we prefer placing the store on a cluster and worrying about other things like product loading, actually we sell the sites on and act as an incubator so time is commodity, be it Magento 1.9x or 2.4x, performance is best left to finding a good hosting provider who can do this for you, Nexcess comes to mind.

Not the answer you're looking for? Browse other questions tagged or ask your own question.