How to Enable Magento 2 Profiler
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:
- Enable profiler in Magento 2 by adding SetEnv MAGE_PROFILER “html” to .htaccess.Here, ‘html’ is for HTML output. You can modify to ‘csvfile’ for CSV output or ‘firebug’ for Firebug output.
- Enable the developer mode using the below command:
1bin/magento deploy:mode:set developer - 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.
However, any issues with Magento 2 Profiler are welcome in the Comments section?
Don’t hesitate to rate the post with 5 stars if it helped improve the store performance!
Thank You!
Sanjay 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.
Prev
List of Useful Magento 2 SSH/CLI Commands
Magento Shipping Per Product – Meetanshi Extension Explained
Next