Enable Template Path Hints Magento 2

Template path hints is a useful tool for developers. It is used to trace (and diagnose) the path of each template used on a page. By default, Magento 2 have the option to enable template path hints that make developers’ life easy as they can easily identify the location and path of a specific template. You can easily enable and disable template path hints for storefront as well as Admin.

So, in this tutorial, I am going to show you the easy way to enable and disable template path hints in Magento 2.

Enable Template Path Hints Via Admin Panel

Open the admin panel of your store and navigate to Stores → Configuration:

 

Click Developer under ADVANCED:

Now expand the Debug section:

 

First select Yes from Enabled Template Path Hints for Storefront dropdown:

 

Next, select Yes from Enabled Template Path Hints for Admin drop-down:

 

Now just click Save Config at the top of the page:

Note: Following this process, you could also disable the template path hints.

 

Now you can see the template path hints on your admin panel:

Go to your store front page and you will see template hints enabled:

 

Enable Template Path Hints Via CLI

Connect to your store with SSH terminal, and go to the root directory of your Magento 2 store.

To enable template path hints for storefront, run this command:

php bin/magento dev:template-hints:enable

To disable template path hints for storefront, run this command:

bin/magento dev:template-hints:disable

Finally, clean up and flush the cache:

bin/magento cache:clean

bin/magento cache:flush

Note: You can’t enable or disable template path hints for Admin using CLI.

Wrapping Up

Enabling template path hints is a great solution for developers who need to understand and identify the template paths used on pages. By following the above simple steps, you can enable (and disable) template path hints for your Magento 2 store. If you face any issue related to this process, drop your comment below and I will get back to you!

Author Bio:

Syed Muneeb Ul Hasan is a Magento Developer and Blogger at Magenticians – a platform of Magento Tutorials. He is an expert in PHP and Magento and prefers to educate users in the implementation of Magento. When not working, he loves to play games and watch cricket. You can follow him on Twitter.

 

Anh Van

Recent Posts

Salesforce Mobile App Customization and Personalization For Business: A Complete Guide

Salesforce is a strong tool that enables businesses to control processes, customer relations, as well…

3 weeks ago

Latest Mobile App Design Trends That You Should Consider | 2025 Updated

By 2025, the latest mobile app design trends are expected to generate $270 billion from…

4 weeks ago

15+ Must-have Magento 2 Free Extensions To Supercharge Your Store | 2025 Updated

Magento 2 is an incredibly flexible and powerful eCommerce platform that can be tailored to…

1 month ago

Black Friday 2024: Hot Deals Collection For Magento 2

Black Friday and Cyber Monday – BFCM 2024 are nearly around the corner, and it’s…

1 month ago

What To Consider While Using Magento 2.0 For Your Streaming App?

When it comes to e-Commerce platforms, undoubtedly Magento 2.0 grabs the spotlight. Magento might not…

1 month ago

Landofcoder BFCM 2024: Biggest Sale Of The Year – 30% OFF All Magento 2 Extensions

The holiday shopping season is here, and there’s no better time to supercharge your Magento…

1 month ago