php bin/magento dev:source-theme:deploy

What is the use of this above command? Explain briefly.


4 Answers 4


Trick : use php bin/magento, this will output all commands with their purpose

enter image description here

So :

dev:source-theme:deploy = Collects and publishes source files for theme.

  • What is the use of creating less file in pub/static?
    – Priya
    Sep 26, 2019 at 4:38

Use this command to create symlinks to LESS files. Please check below URL which will help. URL: https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-less-sass.html


This command runs to create symlinks to LESS files in project.

dev:source-theme: deploy: Collects and publishes source files for the theme.


To create LESS files for the frontend theme named VendorName/themeName in the en_US locale using a CSS file named <magento_root>/pub/static/frontend/VendorName/themeName/en_US/css/styles-l.css, enter the following command:

bin/magento dev:source-theme:deploy --type="less" --locale="en_US" --area="frontend" --theme="VendorName/themeName" css/styles-l

For more details refer official document:

Check symlink file

enter image description here

  • How we can check this , if symlinks created or not?
    – Priya
    Sep 25, 2019 at 10:14
  • Hi priya check image to check symlink Sep 25, 2019 at 11:06
  • Yes. Thank You.
    – Priya
    Sep 25, 2019 at 12:04
  • It is creating less file in pub/Static , and what is the use of this when creating this less files??
    – Priya
    Sep 25, 2019 at 13:17

The command dev:source-theme: deploy is used to deploy a Magento 2 theme. It copies the files and directories from the theme source directory to the Magento root directory. It also updates the theme registration and sets it as a deployable theme. This command is useful for deploying a custom theme quickly and easily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.