Use the advanced developer tools to determine the compilation mode during frontend development, create an allowlist of IP addresses, and display template path hints. There is also tooling to easily make spot changes to text in the interface of the storefront and Admin.
Your Adobe Commerce or Magento Open Source instance can be deployed to run in either production or developer mode. The tools and configuration settings that are designed specifically for developers can be accessed only while the store is running in developer mode.
The operation mode can be changed only from the command line of the server by a user with appropriate permissions. See Set the operation mode in the Configuration Guide for more information.
Most topics in the merchant documentation apply to a Commerce instance that is running in production mode. However, the following configuration settings and tools can be used only when the installation is running in developer mode.
The Frontend Development Workflow type determines if Less compilation takes place on the client- or server side during development. Less is an extension of CSS that has additional features and conventions, and that produces streamlined code. Client-side Less compilation is recommended for theme development. Server-side compilation is the default mode. The development workflow options are not available for stores in production mode.
See Client-side LESS compilation vs. server-side in the Commerce developer documentation.
The frontend development workflow configuration is available in Developer mode only.
On the Admin sidebar, go to Stores > Settings > Configuration.
In the left panel, expand Advanced and choose Developer.
Expand the Front-end Development Workflow section.
Set Workflow Type to one of the following:
Client side less compilation
- Compilation takes place in the browser using the native less.js
library.Server side less compilation
- Compilation takes place on the server using the Less PHP library. This is the default mode for production.When complete, click Save Config.
Adding a digital signature to the URL of static files makes it possible for browsers to detect when a newer version of the file is available. Static files that can be tracked with digital signatures include JavaScript, CSS, images, and fonts. The signature is appended to the path directly after the base URL. If a file’s signature differs from what is stored in the browser’s cache, then the newer version of the file is used.
See Static content signing in the Commerce developer documentation.
The Static File Settings configuration is available only when working in developer mode.
For a detailed list of the configuration settings, see Static File Settings in the Configuration Reference.
To enable signed static files:
On the Admin sidebar, go to Stores > Settings > Configuration.
In the left panel, expand Advanced and choose Developer.
Expand the Static Files Settings section.
Set Sign Static Files to Yes
.
When complete, click Save Config.
The time it takes to load resource files can be reduced by merging and bundling files, and by minimizing code.
By default, Adobe Commerce and Magento Open Source do not merge, bundle, or minimize files, and the project developer should determine which file optimization methods should be used.
See Performance best practices for more information.
CSS and JavaScript files can be optimized in Developer Mode only.
File type | Supported operations |
---|---|
CSS Files | MergeMinify |
JavaScript Files | MergeBundleMinify |
Template Files | Minify |
To optimize resource files:
On the Admin sidebar, go to Stores > Settings > Configuration.
In the left panel, expand Advanced and choose Developer.
To optimize CSS files, expand the CSS Settings section and do the following:
Yes
.Yes
.To optimize JavaScript files, expand the JavaScript Settings section and do the following:
Yes
.Yes
.To minify PHTML template files, expand the Template Settings section and set Minify Html to
Yes
.
When complete, click Save Config.
Before using a tool such as template path hints, make sure to add your IP address to the Developer Client Restrictions allowlist to avoid disrupting the shopping experience of customers in the store. If you don’t know your IP address, you can search for it online.
Developer Client Restrictions can be set in Developer Mode only.
For technical information, see Custom VCL for allowing requests in the Commerce on Cloud Infrastructure Guide.
To add your IP address to the allowlist:
On the Admin sidebar, go to Stores > Settings > Configuration.
In the left panel, expand Advanced and choose Developer.
Expand the Developer Client Restrictions section.
For Allow IPs, enter your IP address.
If access is needed from multiple IP addresses, separate each with a comma.
When complete, click Save Config.
When prompted, refresh any invalid caches.
Template path hints are a diagnostic tool that adds notation with the path to each template that is used on the page. Template path hints can be enabled for either the storefront or the Admin.
Template Path Hints can be edited in developer mode only.
See Locate templates, layouts, and styles in the Commerce developer documentation.
Before using template path hints, add your IP address to the allowlist to avoid interference with customers who are shopping in the store. When you are finished, make sure to clear the Commerce cache to remove all hints from the store.
On the Admin sidebar, go to Stores > Settings > Configuration.
In the left panel, expand Advanced and choose Developer.
Expand the Debug section and do the following:
To activate template path hints for the store, set Enabled Template Path Hints for Storefront to Yes
.
To enable template path hints for the store only when the URL includes the templatehints
parameter, set Enable Hints for Storefront with URL Parameter to Yes
. Then set value for the parameter if needed. The default value is magento
, but you can use a custom value. For example, if you change the value to lorem
, you would use mymagento.com?templatehints=lorem
to display template hints.
To activate template path hints for the Admin, set Enabled Template Path Hints for Admin to Yes
.
To include the names of blocks, set Add Block Class Type to Hints to Yes
.
When complete, click Save Config.
On the Admin sidebar, go to System > Tools > Cache Management.
In the upper-right corner, click Flush Magento Cache.
You can use the Translate Inline tool in developer mode to touch up text in the interface to reflect your voice and brand. When the Translate Inline mode is activated, any text on the page that can be edited is outlined in red. It is easy to edit field labels, messages, and other text that appears throughout the storefront and Admin. For example, many themes use terminology such as My Account, My Wishlist, and My Dashboard, to help customers find their way around. However, you might prefer to simply use the words Account, Wishlist, and Dashboard.
The Translate Inline tool is available only when working in developer mode.
See Translations overview in the Commerce developer documentation.
If your store is available in multiple languages, you can make fine adjustments to the translated text for the locale. On the server, interface text is maintained in a separate CSV file for each output block, and is organized by locale. As an alternate approach, rather than use the Translate Inline tool, you can also edit the CSV files directly on the server. Translation files are stored in app/code/Magento/<module_name>/i18n/<language_locale>.csv
.
To use the Translate Inline tool, your browser must allow pop-ups.
On the Admin sidebar, go to System > Tools > Cache Management.
Select the following checkboxes:
Blocks HTML output
Page Cache
Translations
Set the Actions control to Disable
and click Submit.
On the Admin sidebar, go to Stores > Settings > Configuration.
To work with a specific store view, set the Store View to be updated.
In the left panel, expand Advanced and choose Developer.
Expand the Translate Inline section.
Clear the Use Website checkbox as needed to modify these settings.
The Enabled for Admin option is not available when editing a specific store view.
Set Enabled for Storefront to Yes
.
When complete, click Save Config.
When prompted, refresh the invalid caches, but leave the disabled caches as they are for now.
Open your storefront in a browser and go to the page that you want to edit.
If necessary, use the language chooser to change the store view. Each string of text that can be translated is outlined in red. When you hover over any text box, a book icon ( ) appears.
Click the book icon to open the Translate window and do the following:
If the change is for the specific store view, select the Store View Specific checkbox.
Enter the new Custom text.
When complete, click Submit.
To see your changes in the store, refresh the browser.
Repeat this process for any elements in the store to be changed.
Return to the Admin of your store.
On the Admin sidebar, go to Stores > Settings > Configuration.
Set Store View to the specific view that was edited.
In the left panel, expand Advanced and choose Developer.
Expand the Translate Inline section.
Set Enabled for Frontend to No
.
When complete, click Save Config.
On the Admin sidebar, go to System > Tools > Cache Management.
Select the checkbox of the following output caches that were previously disabled:
Blocks HTML output
Page Cache
Translations
Set the Actions control to Enable
and click Submit.
When prompted, refresh any invalid caches.
Go to your storefront and examine each page that was updated to make sure that the changes are correct. In this example, Customer Login
was changed to Customer Sign In
. If changes were made to a specific view, use the Language Chooser to switch to the correct view.