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

How To Disable Magento 2 Profiler

By Sanjay JethvaUpdated on May 22, 2025 1 min read

I earlier posted the method to enable Magento 2 profiler to analyze the performance problems on the server-side.

However, once the speed check is done, one needs to disable Magento 2 profiler so that the frontend users are not bothered.

Else, the user experience is hindered which is not acceptable.

The below solution shows how to disable profiler in Magento 2 after the speed check is done.

Method to Disable Magento 2 Profiler:

Run the below CLI command:

php bin/magento dev:profiler:disable <type>

Here, <type> can be either “html”, “cscfile”, or “flagfile”.

If it is “flagfile”, a flagfile named as profiler.flag will be created inside var/directory.

Once done, the profiler is disabled in Magento 2 and the store is now ready to host the visitors!

Do share the post with Magento peps via social media.

Thanks.

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.