How to enable template path hints in Magento 2
You can use the Template Path Hints diagnostic tool in Magento 2 to add notations showing which template paths are used on a page. This is helpful for debugging and customizing your store.
1. Add Your IP Address to Developer Restrictions
To avoid disrupting your customers' shopping experience, you should first add your IP address to the Developer Restrictions allow list. If you don’t know your IP, search for it online.
Path:
Admin -> Stores -> Settings -> Configuration -> Advanced -> Developer -> Developer Client Restrictions
- Add your IP address. For multiple IPs, separate them with commas.
- Click Save Config and then Flush Magento Cache from the Cache Management section.

2. Ensure Developer Mode is Enabled
Template Path Hints can only be enabled in Developer mode.
Check your current mode via SSH:
php bin/magento deploy:mode:show
If the mode is set to production, switch to developer mode:
php bin/magento deploy:mode:set developer
3. Enable Template Path Hints
Path:
Admin -> Stores -> Settings -> Configuration -> Advanced -> Developer -> Debug
- Enabled Template Path Hints for Storefront → Set to Yes (this also unlocks more options).
- Enable Hints for Storefront with URL Parameter → Set to Yes if you want hints to display only when the URL contains a specific parameter.
- Parameter Value → Default is
magento. You can use a custom parameter. Example:
yourstore.com?templatehints=customvalue
- Enabled Template Path Hints for Admin → Set to Yes to enable hints in the Admin panel.
- Add Block Names to Hints → Set to Yes if you also want block names displayed in the hints.
Click Save Config and then Flush Magento Cache.

✅ Done! You’ve successfully enabled Template Path Hints in Magento 2.
Updated on: 18/09/2025
Thank you!
