How to enable the Magento profiler
Key takeaways
- Magento Profiler helps developers identify slow code, memory usage, and performance bottlenecks.
- This guide focuses on the Magento 1 Profiler workflow.
- Magento Profiler should be used in development, staging, or controlled troubleshooting.
- Disable Profiler after testing so sensitive technical information is not exposed.
Magento Profiler can help developers diagnose slow load times, memory usage, and code-level performance issues. However, it should be treated as a controlled development tool, not something to leave visible on a live public site.
Host Magento at full throttle.
Get secure, reliable Magento hosting so you can scale faster.
What is Magento Profiler?
Magento Profiler is a built-in development tool that measures how long code blocks take to execute and how much memory they use.
Developers can use it to diagnose slow load times, checkout issues, custom module problems, extension performance, memory-heavy processes, and code changes that affect page speed.
Before you enable Magento Profiler
Use Magento Profiler carefully. It can expose technical details about your site’s code, execution time, memory usage, and page generation process.
Note the following words of caution:
- Only developers with an intimate understanding of both PHP and Magento should attempt to use the profiler.
- Don’t use the profiler on live sites; the profiler exposes sensitive information and is therefore only safe to use on development sites.
If you need to troubleshoot a production issue, use staging whenever possible. If production testing is unavoidable, limit access, test quickly, and disable Profiler as soon as you’re finished.
How to enable Magento Profiler in Magento 1
The Magento 1 Profiler workflow requires an Admin setting and an index.php update.
Step 1: Enable Profiler in Magento Admin
- From the Magento Admin Panel, select System > Configuration.
- Scroll down to the Advanced sub-menu on the left and click Developer.
- From the Debug drop-down list, in the Profiler field, click Yes.
- Click Save Config.
Step 2: Edit index.php
- Open the index.php file in the root install.
- Find the line #Varien_Profiler::enable() and uncomment it.
- If this line does not exist, then place it anywhere before the line Mage::run($mageRunCode, $mageRunType);
Step 3: Load the storefront
Test the profiler by navigating to any forward-facing web page.
If Profiler is working, the output should appear on the page. Test the specific page or workflow you are investigating, such as a product page, category page, cart, checkout, or admin-related flow.
Magento Profiler output explained
After Magento Profiler is enabled, the output table shows performance and memory details for different code blocks.
| Profiler field | What it means |
| Memory usage | Indicated on the top right in bytes. Divide by 1048576 to convert this number to megabytes |
| Code profiler | This column identifies the block of code being executed |
| Time | This column shows how long the page took to execute the code, in seconds |
| Cnt | Representing “count,” this column shows how many times this individual code block ran to generate the required output |
| Emalloc | The amount of memory PHP assigned to this operation, represented in bytes |
| RealMem | The actual amount of memory used to process the operation |
The goal is to look for processes that take longer than expected, run too many times, or use more memory than expected.
How to read Magento Profiler results
Start with the slowest time values. These can point to code blocks, layout processes, extensions, or database-related activity that may be contributing to slow page loads.
Then review high count values. A process that runs once may not matter much, but a process that runs hundreds or thousands of times can create performance issues.
Also watch memory usage. High memory numbers may point to inefficient code, heavy modules, large data operations, or pages that need deeper review.
Use Profiler results as a starting point, not the final diagnosis. The output can point you toward slow or repeated processes, but a developer should review the related code, extensions, and database activity before making changes.
Magento 1 Profiler vs Magento 2 Profiler
This guide focuses on Magento 1 Profiler, which uses Magento Admin settings and an index.php change to display profiler output.
Magento 2 uses a different process. Magento 2 Profiler is commonly enabled with CLI commands or environment configuration, and output options may include HTML or CSV file formats.
For Magento 2, a common command is:

To disable Magento 2 Profiler, a common command is:

If you’re working in Magento 2, follow Magento 2-specific documentation or your developer’s workflow instead of using Magento 1 instructions.
Magento Profiler output options
Magento Profiler output options vary by Magento version and setup.
| Output type | Common use |
| HTML | Displays profiler output on the page |
| CSV/csvfile | Writes profiler data to a CSV file, often under var/log in Magento 2 workflows |
| Firebug | Legacy debugging format used in older workflows |
For Magento 1, the main focus is the profiler output shown on the page after enabling Profiler in Admin and index.php.
How to disable Magento Profiler
Disable Magento Profiler when troubleshooting is finished.
For Magento 1:
- Go back to System > Configuration > Advanced > Developer > Debug.
- Set Profiler to No.
- Save the configuration.
- Revert the index.php change if needed.
- Clear cache.
- Confirm profiler output no longer appears.
Leaving Profiler enabled can expose sensitive technical information and add unnecessary overhead.
Troubleshooting Magento Profiler
If Magento Profiler output doesn’t appear, check the basics first.
Common issues include:
- Profiler isn’t enabled in Admin
- The index.php change is missing
- Cache hasn’t been cleared
- The wrong configuration scope is selected
- Output is hidden by the theme or layout
- The wrong page is being tested
- Developer settings weren’t saved
- File edits were uploaded to the wrong environment
Magento Profiler best practices
Test one issue at a time. Record baseline results before changing code, then compare the same page after the fix.
Review the slowest processes first, then look for code blocks that run repeatedly or use more memory than expected.
Magento Profiler FAQs
Getting started with Magento Profiler
Magento Profiler helps developers investigate slow pages, memory usage, and code bottlenecks, but it should be used carefully.
Enable Profiler in a staging or controlled environment, load the page you want to test, review the slowest or most repeated processes, and disable Profiler when finished.
Magento performance troubleshooting works best with reliable hosting, safe file access, staging options, and support. Explore Liquid Web Magento hosting for infrastructure built to help manage performance with confidence.
For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.
Ready to get started?
Get the fastest, most secure Magento hosting on the market
Additional resources
Best abandoned cart solutions for Magento →
Learn how abandoned cart emails can help recover lost sales and bring shoppers back.
How to see (and hide) product reviews in Magento →
See how Magento product reviews can build trust and help shoppers buy with confidence.
Magento security guide: 11 best practices →
Explore Magento security tips to help protect your store, customers, and data.
