{"id":277,"date":"2018-12-31T12:22:45","date_gmt":"2018-12-31T12:22:45","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2018\/12\/31\/enable-magento-2-profiler\/"},"modified":"2025-05-22T17:09:54","modified_gmt":"2025-05-22T11:39:54","slug":"enable-magento-2-profiler","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/enable-magento-2-profiler\/","title":{"rendered":"How to Enable Magento 2 Profiler"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Gradually, every system tends to slow down by means of performance after it\u2019s loaded with more content and extensions and numerous logs gets generated for it. If you want to keep an eye on what\u2019s slowing down your Magento 2 store\u2019s performance, you need to enable&nbsp;<em>Magento 2 profiler<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Magento 2 has an in-built profiler which is used to identify performance problems on the server side. The profiler allows you to see the execution time of certain files. Identifying which files is slowing down the performance speed can help optimize the store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are 3 types of profilers supported:&nbsp;<strong>HTML, CSV file,<\/strong>&nbsp;and&nbsp;<strong>Firebug<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Analyze the performance tasks, display dependency graphs on a Magento page, reveal unused dependencies to reduce the memory time, etc. Everything with the method given here to&nbsp;<em><strong>enable Magento 2 profiler<\/strong><\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Enable Magento 2 Profiler:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. profiler in Magento 2 by adding SetEnv MAGE_PROFILER \u201chtml\u201d to .htaccess.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/12\/enable-Magento-2-profiler.png\" alt=\"enable Magento 2 profiler\" class=\"wp-image-4004\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here,&nbsp;<em>\u2018<strong>html\u2019<\/strong><\/em>&nbsp;is for HTML output. You can&nbsp;modify to<em>&nbsp;\u2018<strong>csvfile<\/strong>\u2019<\/em>&nbsp;for CSV output or&nbsp;<em>\u2018<strong>firebu<\/strong>g\u2019<\/em>&nbsp;for Firebug output.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Enable the developer mode using the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bin\/magento deploy:mode:set developer<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3. Finally,&nbsp;<strong>compile<\/strong>&nbsp;and<strong>&nbsp;refresh&nbsp;<\/strong>the<strong>&nbsp;cache<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following the above method, you can find the reason behind the poor Magento 2 store performance. Hunt down the problem causes by enabling&nbsp;<em><strong>Magento 2 profiler<\/strong><\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Easy, isn\u2019t it?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you find out the issue with the performance, you can also&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/disable-magento-2-profiler\/\" target=\"_blank\" rel=\"noreferrer noopener\">disable Magento 2 profiler<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank You!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gradually, every system tends to slow down by means of performance after it\u2019s loaded with more content and extensions and numerous logs gets generated for&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-277","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=277"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions"}],"predecessor-version":[{"id":15537,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions\/15537"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}