🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Enable Magento 2 Profiler

By Sanjay JethvaUpdated on May 22, 2025 2 min read

Gradually, every system tends to slow down by means of performance after it’s loaded with more content and extensions and numerous logs gets generated for it. If you want to keep an eye on what’s slowing down your Magento 2 store’s performance, you need to enable Magento 2 profiler.

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.

There are 3 types of profilers supported: HTML, CSV file, and Firebug.

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 enable Magento 2 profiler.

How to Enable Magento 2 Profiler:

1. profiler in Magento 2 by adding SetEnv MAGE_PROFILER “html” to .htaccess.

enable Magento 2 profiler

Here, html’ is for HTML output. You can modify to ‘csvfile for CSV output or firebug’ for Firebug output.

2. Enable the developer mode using the below command:

bin/magento deploy:mode:set developer

3. Finally, compile and refresh the cache.

Following the above method, you can find the reason behind the poor Magento 2 store performance. Hunt down the problem causes by enabling Magento 2 profiler.

Easy, isn’t it?

Once you find out the issue with the performance, you can also disable Magento 2 profiler.

Thank You!

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.