How To Disable Magento 2 Profiler

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.

Table of Contents