Optimise your magento store for better performance

 



Magento is one of the most commonly used ecommerce platforms by the developers around the globe. Since its having high level of functionality,customizability and large databases, as well as a higher number of requests on page load which consequently, makes Magento slower. So we help you to optimise your magento store for the better performance, kindly follow the instructions given below:

  1. Magento Caching needs to be enabled : Make Magento caching system as enable will be the basic, and the simplest way in which you can optimize the performance of your Magento site. Since Magento caching is disabled by default, once enabled,your website will start serving pages to your website visitors faster. For making this changes you need to go to your Magento Admin Panel, and in the System Menu, enable cache management.


  1. Need to optimise Images : High resolution images are commonly used on Magento stores for the better user engagement. However, these heavy images can lower your site’s loading speed as this decreases their download time too and therefore you need to compress them before uploading on your site. There are many extensions available to compress all types of images like Magento extension called GTspeed which includes image optimization as well as CSS/JS concatenation and minification. One more tool named Fooman Speedster is a very useful module for Magento that dramatically decreases your site’s load time. This module works by compressing and combining your JavaScript/CSS files. Moreover it also enables Gzip compression for all pages in your website.


  1. Cleaning Magento logs : Log cleaning feature is disabled by default in Magento backend. The Logs are created automatically about frequently read pages, frequently compared products, or best sellers are kept for 180 days before being deleted by the system itself. Over time, this amount of information can be a big burden in your Magento database. The simpler way to manage your logs is to change saved log days. This can be done following this path: “Stores” > “Configuration” > “Advanced” > “System” > “Log”. You need to choose a required number for your “Save Log, Days” to determine how long Magento should keep your logs. Choose “Yes” for “Enable Log Cleaning”. Click “Save Config” to save your changes.


  1. Tuning MySQL server to be optimised : Every time when a Magento webpage is loaded, the database server must work on a series of queries. These queries are handled on an individual basis, with data fetched from the disk, processed, and finally returned to the user. Slow disk access happens, making webpages slow to load. MySQL provides query_cache_size i.e configuration command that tells the server to store query result in memory, instead of fetching it all the way from disk. The size you can set for this cache depends on how much memory your MySQL server can handle.  

          We recommend you to set certain things inside my.cnf file inside the server :

query_cache_type = 1

query_cache_size = 32M

query_cache_limit=2M 

Also make sure the below line is present in php.ini file:

php_value memory_limit 512M

  1. Enable Keepalive : Enabling KeepAlive allows the connection between a client and server to remain open. This will decreases your site loading time by allowing multiple requests to be served on the same connection. This is an best method and quite useful for websites those are having  many pages and that include lots of images. It works by opening multiple connections that make downloading content faster.


  1. Merge CSS and Javascript files : Magento makes it much easier by allowing admin to merge Javascript and CSS files into one single compressed file, enabling this content to be retrieved by only one HTTP request and save bandwidth. To merge these two files, you need to do the following:

          Go to “System” > “Advanced” > “Developer”

          Under the “JavaScript Settings” and “CSS Settings,” change the dropdown  

          menu option to “Yes.” Then click on “Save Config.”

          Once done with it you need to clean the cache run the following commands in

          your Magento root directory:

          php bin/magento cache:clean

          php bin/magento cache:flush

  1. Enable Magento Compilation (Only Magento Version <2) : Magento has a unique compilation feature which has been reported to give up to a 50% of performance boost for your website. By default, Magento’s application files are searched in a certain order everytime the page loads, which results in a lot of file system reads. The Magento compiler reduces these reads by copying all of these files into a single include directory and also caches ones that are used more frequently. 

To do this changes you need to Navigate to “System” → “Tools”
“Compilation.”

Next click on “Run Compilation Process.”
Note: Before installing any new extensions or upgrading Magento you have to disable this feature.

  1. Enable Flat Catalog : Magento uses the model named EAV to store the customer and product data. Enabling the flat catalog for categories and products merges product data into one table, thereby improving performance by responding to MySQL queries faster. If your eCommerce store has more than 1000 products, this can very beneficial to reduce the complication related to data’s.

So you need to follow the below steps to enable this model:

  • Navigate to “Stores” → “Configuration” → “Catalog”

  • Next Under “Storefront” change “Use Flat Catalog Category” and “Use Flat Catalog Product” to “Yes”.

  • Click on “Save Config”

  • Clear the cache. The recommended way to do this is to delete everything from the /var/cache directory. You can also do it by navigating to “System” → “Cache Management” and clicking on “Flush Cache Storage” which is equivalent to deleting all the cache.


  1. Remove unnecessary extensions : Calling more third party extensions on your websites means loading more HTTP requests, CSS sheets and Javascript files. Without proper customization, these additional modules’ codes can conflict with the rest of the things and cause trouble for your system. While Javascript code like Google Analytics is all readily optimized, examine carefully and decide which extensions and modules can be removed from your store without compromising its function in general.

Modules can be disabled in magento backend by going to :

  • “Stores” -> “Configuration” -> “Advanced” -> “Advanced”.

  • After disabling modules of choice, click “Save Config” to see a change in your site loading speed.