{"id":938,"date":"2018-09-28T06:48:05","date_gmt":"2018-09-28T06:48:05","guid":{"rendered":"https:\/\/www.tatvasoft.com.au\/blog\/?p=938"},"modified":"2022-03-17T07:29:37","modified_gmt":"2022-03-17T07:29:37","slug":"how-to-boost-e-commerce-site-performance-using-magento-2","status":"publish","type":"post","link":"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/","title":{"rendered":"How to boost E-commerce Site Performance using Magento 2"},"content":{"rendered":"<p>Most of the time users need to wait for some time while accessing a particular website. Due to this reason they often leave a particular site without even completing a particular task.<span id=\"more-1075\"><\/span><\/p>\n<p>Don\u2019t examine the \u201cpatience\u201d of your targeted audience while trying to access the content of your particular website. But, examine to present them a seamless ride through the entire process by executing these site optimization tips on your <a href=\"https:\/\/www.tatvasoft.com.au\/services\/ecommerce-solutions\/\">Magento development<\/a>.<\/p>\n<p>Here are some points which provide instructions for optimizing the performance of your website. Some are very basic steps\/configurations changes only which will improve performance on the go.<\/p>\n<h2>Steps to Optimize performance in Magento 2 Development<\/h2>\n<h4>1. Enable Flat Catalogue Categories and Products<\/h4>\n<p>There are 2 data models in Magento: EAV (Entity Attribute Value \u2013 default) and flat. EAV is a kind of an agile model. It allows the user to add custom attributes as many as likes, but the problem with EAV is that it stores the data in many tables and in order to perceive the information your query will have various JOINs which is a bad performance.<\/p>\n<p>The flat model takes the attributes you have created with a system created attributes and creates a multicolumn table on the fly. So in order to comprehend the data, you will have to make just 1 simple SELECT query to db.<\/p>\n<p>In flat mode, you can change or add attributes but need to re-index which will be manually or will be automatically, depends on your configuration, and it will create flat table again.<\/p>\n<p>In EAV data model data is fully in normalized mode, each column data value is stored in their respective data type table. For example<\/p>\n<p>product ID is stored in catalog_product_entity_int table<\/p>\n<p>product name in catalog_product_entity_varchar table<\/p>\n<p>Flat data model use one table, so it\u2019s not normalized and uses more database space.<\/p>\n<p>To enable flat catalog categories and products goto Admin Panel &gt; Store &gt; Configuration &gt; Catalog &gt; Catalog &gt; Storefront and set \u2018<strong>Use Flat Catalog Category<\/strong>\u2018 and \u2018<strong>Use Flat Catalog Product<\/strong> \u2018 value yes.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1076\" style=\"max-width: 100%; height: auto;\" title=\"Flat catalog Categories\" src=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Flat-catalog-Categories.png\" alt=\"Flat catalog Categories\" width=\"600\" height=\"396\" \/><\/p>\n<h4>2. Merge CSS and JS Files<\/h4>\n<p>To merge and minify JS file goto Admin Panel &gt; Store &gt; Configuration &gt; Advance &gt;\u00a0 Developer &gt; JavaScript Settings. Minification is not applicable in developer mode.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1078\" style=\"max-width: 100%; height: auto;\" title=\"Merge CSS and JS files\" src=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-CSS-and-JS-files.png\" sizes=\"(max-width: 685px) 100vw, 685px\" srcset=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-CSS-and-JS-files.png 1893w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-CSS-and-JS-files-300x114.png 300w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-CSS-and-JS-files-1024x389.png 1024w\" alt=\"Merge CSS and JS files\" width=\"685\" height=\"260\" \/><\/p>\n<p>To merge and minify CSS file goto Admin Panel &gt; Store &gt; Configuration &gt; Advance &gt; Developer &gt; CSS Settings. Minification is not applicable in developer mode.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1079\" style=\"max-width: 100%; height: auto;\" title=\"Merge Css Files\" src=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-Css-Files.png\" sizes=\"(max-width: 852px) 100vw, 852px\" srcset=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-Css-Files.png 1913w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-Css-Files-300x116.png 300w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Merge-Css-Files-1024x395.png 1024w\" alt=\"Merge Css Files\" width=\"852\" height=\"328\" \/><\/p>\n<p>When complete, Save Config and execute below command in command line to activate the change.<\/p>\n<p>php bin\/magento cache:clean<\/p>\n<h4>3. Content Delivery Network (CDN)<\/h4>\n<p>To setup content delivery network for Magento 2 stores goto Admin Panel &gt; Stores\u00a0 &gt; Configuration &gt; General &gt; Web &gt; Base URLs (Secure)<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1081 \" style=\"max-width: 100%; height: auto;\" title=\"Content Delivery Network\" src=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Content-Delivery-Network1.png\" sizes=\"(max-width: 706px) 100vw, 706px\" srcset=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Content-Delivery-Network1.png 898w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Content-Delivery-Network1-300x267.png 300w\" alt=\"Content Delivery Network\" width=\"706\" height=\"627\" \/><\/p>\n<h4>4. Cache Management<\/h4>\n<p>To manage cache goto Admin Panel &gt; System &gt; Cache Management<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1082\" style=\"max-width: 100%; height: auto;\" title=\"Cache Management\" src=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Cache-Management.png\" sizes=\"(max-width: 857px) 100vw, 857px\" srcset=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Cache-Management.png 1924w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Cache-Management-300x146.png 300w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Cache-Management-1024x497.png 1024w\" alt=\"Cache Management\" width=\"857\" height=\"416\" \/><\/p>\n<h4>5. Image Optimization<\/h4>\n<p>Image size is important factor to improve performance of Magento 2 website. The image size is too heavy to upload on your site is one of the reason for the overload page. Hence compression image should be done before submitting any image.<\/p>\n<h4>6. Enable Compression<\/h4>\n<p>Follow the resources to facilitate compression by Google\u2019s offer. Let\u2019s change nginx compression directives from:<\/p>\n<ol>\n<li>gzip_types: text\/plain application\/x-javascript text\/javascript text\/xml text\/css image\/x-icon image\/bmp image\/png image\/gif; to<\/li>\n<li>gzip_types: *;<\/li>\n<\/ol>\n<h4>7. Reduce Server Response Time<\/h4>\n<p>Magento 2 supports full page cache via varnish natively. Let\u2019s setup varnish to get the first byte around 0.1-0.2s. To setup varnish goto Admin Panel &gt; Store &gt; Configuration &gt; Advance &gt; System &gt; Full Page Cache.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1083\" style=\"max-width: 100%; height: auto;\" title=\"Full Page Cache\" src=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Full-Page-Cache.png\" sizes=\"(max-width: 869px) 100vw, 869px\" srcset=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Full-Page-Cache.png 1251w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Full-Page-Cache-300x51.png 300w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Full-Page-Cache-1024x174.png 1024w\" alt=\"Full Page Cache\" width=\"869\" height=\"148\" \/><\/p>\n<p>Open Varnish Configuration section, complete the settings:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-1084\" style=\"max-width: 100%; height: auto;\" title=\"Varnish Configuration\" src=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Varnish-Configuration.png\" sizes=\"(max-width: 838px) 100vw, 838px\" srcset=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Varnish-Configuration.png 1056w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Varnish-Configuration-300x166.png 300w, https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/Varnish-Configuration-1024x567.png 1024w\" alt=\"Varnish Configuration\" width=\"838\" height=\"464\" \/><\/p>\n<h4>8. Magento Updates<\/h4>\n<p>Remember to update Magento 2 that will try the best to help you optimize the site performance.<\/p>\n<h4>9. Production Mode<\/h4>\n<p>Make sure, website runs on \u201cproduction\u201d mode while putting it on live environment. Developer mode will have a major impact on performance. Production mode enhances storefront responsiveness and blocks long initial page load times that can happen in default mode.<\/p>\n<h4>10. Enable Magento Default Profiling<\/h4>\n<p>If after doing all basic things, you still can find that your website is slow then you can enable Magento default profiling and find the culprit and take necessary coding level changes.<\/p>\n<h4>11. Server\/Software\u2019s can be used<\/h4>\n<p>Following software or servers can be used which will or help to boost the performance of any Magento web development services.<\/p>\n<ol>\n<li>Varnish Cache<\/li>\n<li>Redis<\/li>\n<li>PHP 7<\/li>\n<li>Solr<\/li>\n<li>Ngnix<\/li>\n<li>PHP<\/li>\n<li>FPM<\/li>\n<li>New Relic<\/li>\n<li>APC Cache<\/li>\n<\/ol>\n<h4>12. Third party plugins<\/h4>\n<p>Make sure that any unused \/ unwanted third party plugins are disabled \/ removed.<\/p>\n<h4>13. SSD Hardisk<\/h4>\n<p>As Magento provide default cashing as files, it is always an advantage to use SSD harddisk<\/p>\n<h4>14. Mysql Tuning<\/h4>\n<p>The following are some of the settings that we can adjust for better performance:<\/p>\n<ol>\n<li>Slow Query Log<\/li>\n<li>Max Connections<\/li>\n<li>Worker Threads<\/li>\n<li>Memory Usage<\/li>\n<li>Key Buffer<\/li>\n<li>Query Cache<\/li>\n<li>Sort Buffer<\/li>\n<li>Joins<\/li>\n<li>Temp Tables<\/li>\n<li>Table (Open &amp; Definition) Cache<\/li>\n<li>Table Scans (read buffer)<\/li>\n<li>Table Locking<\/li>\n<li>Innodb Status<\/li>\n<\/ol>\n<h4>15. Enabling and tuning PHP opcache<\/h4>\n<p>It is recommended to enable and tune PHP opcache for maximum performance.<\/p>\n<ul>\n<li>opcache.enable_cli=1<\/li>\n<li>opcache.memory_consumption=512<\/li>\n<li>opcache.max_accelerated_files=100000<\/li>\n<li>opcache.validate_timestamps=0<\/li>\n<li>opcache.consistency_checks=0<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Most of the time users need to wait for some time while accessing a particular website. Due to this reason&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1387,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Boost your E-commerce site performance using Magento 2<\/title>\n<meta name=\"description\" content=\"Some points which provide instructions for optimizing the performance of your E-commerce website using Magento.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Boost your E-commerce site performance using Magento 2\" \/>\n<meta property=\"og:description\" content=\"Some points which provide instructions for optimizing the performance of your E-commerce website using Magento.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/\" \/>\n<meta property=\"og:site_name\" content=\"TatvaSoft AU Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-28T06:48:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-17T07:29:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/e-commerce-using-magento2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"375\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"3 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/#website\",\"url\":\"https:\/\/www.tatvasoft.com.au\/blog\/\",\"name\":\"TatvaSoft AU Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tatvasoft.com.au\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tatvasoft.com.au\/blog\/wp-content\/uploads\/2018\/09\/e-commerce-using-magento2.jpg\",\"width\":750,\"height\":375,\"caption\":\"Boost E-commerce using Magento 2\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/#webpage\",\"url\":\"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/\",\"name\":\"Boost your E-commerce site performance using Magento 2\",\"isPartOf\":{\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/#primaryimage\"},\"datePublished\":\"2018-09-28T06:48:05+00:00\",\"dateModified\":\"2022-03-17T07:29:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/#\/schema\/person\/99be98dec950f3b1cdc014df166dd95c\"},\"description\":\"Some points which provide instructions for optimizing the performance of your E-commerce website using Magento.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tatvasoft.com.au\/blog\/how-to-boost-e-commerce-site-performance-using-magento-2\/\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/#\/schema\/person\/99be98dec950f3b1cdc014df166dd95c\",\"name\":\"tatvasoftadmin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tatvasoft.com.au\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1ef69a3ae4a620ca0f649d8228bece0b?s=96&d=mm&r=g\",\"caption\":\"tatvasoftadmin\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/posts\/938"}],"collection":[{"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/comments?post=938"}],"version-history":[{"count":21,"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/posts\/938\/revisions"}],"predecessor-version":[{"id":1629,"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/posts\/938\/revisions\/1629"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/media\/1387"}],"wp:attachment":[{"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/media?parent=938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/categories?post=938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tatvasoft.com.au\/blog\/wp-json\/wp\/v2\/tags?post=938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}