magento2: how can i deploy my theme only Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Magento 2 deploy static files for specific theme onlyClear Theme/CSS Cache in Magento 2magento2: how to only deploy used themes to speed up static deployHow to Deploy Child Theme in Magento 2?Magento 2 - Images gone after swapping Theme to custom thememagento2: how to only deploy used themes to speed up static deployWhen I use --clear-static-content and after deploy static content doesn't load any moresetup:static-content:deploy need to run for minor php changes?Magento 2.0 Static Content Deploy PHP Fatal Errorprint.less file error when run deploy commandStatic deployment errors Magento 2.2Magento 2: Static files are present but shows 404magento 2 setup:static-content:deploy execution time errorHow to customize css in pub/static folder. Automatically update old css in magento 2Mganeto2: CLI commands dealing with languages

Why not use the yoke to control yaw, as well as pitch and roll?

/bin/ls sorts differently than just ls

When speaking, how do you change your mind mid-sentence?

Pointing to problems without suggesting solutions

What came first? Venom as the movie or as the song?

Can I ask an author to send me his ebook?

Has a Nobel Peace laureate ever been accused of war crimes?

Does using the Inspiration rules for character defects encourage My Guy Syndrome?

Is the Mordenkainen's Sword spell underpowered?

Is Bran literally the world's memory?

How to create a command for the "strange m" symbol in latex?

How to produce a PS1 prompt in bash or ksh93 similar to tcsh

Converting a text document with special format to Pandas DataFrame

Why does BitLocker not use RSA?

Is it OK if I do not take the receipt in Germany?

Raising a bilingual kid. When should we introduce the majority language?

Why do people think Winterfell crypts is the safest place for women, children & old people?

How can I introduce the names of fantasy creatures to the reader?

Protagonist's race is hidden - should I reveal it?

Why aren't road bike wheels tiny?

How to make an animal which can only breed for a certain number of generations?

Like totally amazing interchangeable sister outfit accessory swapping or whatever

Short story about an alien named Ushtu(?) coming from a future Earth, when ours was destroyed by a nuclear explosion

Is my guitar’s action too high?



magento2: how can i deploy my theme only



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Magento 2 deploy static files for specific theme onlyClear Theme/CSS Cache in Magento 2magento2: how to only deploy used themes to speed up static deployHow to Deploy Child Theme in Magento 2?Magento 2 - Images gone after swapping Theme to custom thememagento2: how to only deploy used themes to speed up static deployWhen I use --clear-static-content and after deploy static content doesn't load any moresetup:static-content:deploy need to run for minor php changes?Magento 2.0 Static Content Deploy PHP Fatal Errorprint.less file error when run deploy commandStatic deployment errors Magento 2.2Magento 2: Static files are present but shows 404magento 2 setup:static-content:deploy execution time errorHow to customize css in pub/static folder. Automatically update old css in magento 2Mganeto2: CLI commands dealing with languages



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








29















I was using this for deploy the content but it is taking too much time.



php bin/magento setup:static-content:deploy 


then i figure out adding the language make fast but it still deploy all the themes.



php bin/magento setup:static-content:deploy en_US


how can i deploy only my theme content only?










share|improve this question






















  • FYI there is a PR that will add this capability and a lot more. I think it'll probably come out with v2.2.

    – thdoan
    Jun 28 '16 at 11:06











  • Another potential solution but for production mode magento.stackexchange.com/questions/126270/…

    – user42315
    Jul 19 '16 at 9:29











  • I am using magento 2.0.4 and using this <code>php -dmemory_limit=8G bin/magento setup:static-content:deploy --theme Rws/fonddecave en_US de_DE fr_FR</code> But error is coming --theme option does not exists. What is my mistake can any one help on this?

    – Raghwendra Ojha
    2 days ago











  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review

    – Shoaib Munir
    2 days ago











  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

    – Teja Bhagavan Kollepara
    2 days ago

















29















I was using this for deploy the content but it is taking too much time.



php bin/magento setup:static-content:deploy 


then i figure out adding the language make fast but it still deploy all the themes.



php bin/magento setup:static-content:deploy en_US


how can i deploy only my theme content only?










share|improve this question






















  • FYI there is a PR that will add this capability and a lot more. I think it'll probably come out with v2.2.

    – thdoan
    Jun 28 '16 at 11:06











  • Another potential solution but for production mode magento.stackexchange.com/questions/126270/…

    – user42315
    Jul 19 '16 at 9:29











  • I am using magento 2.0.4 and using this <code>php -dmemory_limit=8G bin/magento setup:static-content:deploy --theme Rws/fonddecave en_US de_DE fr_FR</code> But error is coming --theme option does not exists. What is my mistake can any one help on this?

    – Raghwendra Ojha
    2 days ago











  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review

    – Shoaib Munir
    2 days ago











  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

    – Teja Bhagavan Kollepara
    2 days ago













29












29








29


13






I was using this for deploy the content but it is taking too much time.



php bin/magento setup:static-content:deploy 


then i figure out adding the language make fast but it still deploy all the themes.



php bin/magento setup:static-content:deploy en_US


how can i deploy only my theme content only?










share|improve this question














I was using this for deploy the content but it is taking too much time.



php bin/magento setup:static-content:deploy 


then i figure out adding the language make fast but it still deploy all the themes.



php bin/magento setup:static-content:deploy en_US


how can i deploy only my theme content only?







magento2 deploy static-content






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 10 '16 at 6:17









Qaisar SattiQaisar Satti

27.2k1258110




27.2k1258110












  • FYI there is a PR that will add this capability and a lot more. I think it'll probably come out with v2.2.

    – thdoan
    Jun 28 '16 at 11:06











  • Another potential solution but for production mode magento.stackexchange.com/questions/126270/…

    – user42315
    Jul 19 '16 at 9:29











  • I am using magento 2.0.4 and using this <code>php -dmemory_limit=8G bin/magento setup:static-content:deploy --theme Rws/fonddecave en_US de_DE fr_FR</code> But error is coming --theme option does not exists. What is my mistake can any one help on this?

    – Raghwendra Ojha
    2 days ago











  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review

    – Shoaib Munir
    2 days ago











  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

    – Teja Bhagavan Kollepara
    2 days ago

















  • FYI there is a PR that will add this capability and a lot more. I think it'll probably come out with v2.2.

    – thdoan
    Jun 28 '16 at 11:06











  • Another potential solution but for production mode magento.stackexchange.com/questions/126270/…

    – user42315
    Jul 19 '16 at 9:29











  • I am using magento 2.0.4 and using this <code>php -dmemory_limit=8G bin/magento setup:static-content:deploy --theme Rws/fonddecave en_US de_DE fr_FR</code> But error is coming --theme option does not exists. What is my mistake can any one help on this?

    – Raghwendra Ojha
    2 days ago











  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review

    – Shoaib Munir
    2 days ago











  • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

    – Teja Bhagavan Kollepara
    2 days ago
















FYI there is a PR that will add this capability and a lot more. I think it'll probably come out with v2.2.

– thdoan
Jun 28 '16 at 11:06





FYI there is a PR that will add this capability and a lot more. I think it'll probably come out with v2.2.

– thdoan
Jun 28 '16 at 11:06













Another potential solution but for production mode magento.stackexchange.com/questions/126270/…

– user42315
Jul 19 '16 at 9:29





Another potential solution but for production mode magento.stackexchange.com/questions/126270/…

– user42315
Jul 19 '16 at 9:29













I am using magento 2.0.4 and using this <code>php -dmemory_limit=8G bin/magento setup:static-content:deploy --theme Rws/fonddecave en_US de_DE fr_FR</code> But error is coming --theme option does not exists. What is my mistake can any one help on this?

– Raghwendra Ojha
2 days ago





I am using magento 2.0.4 and using this <code>php -dmemory_limit=8G bin/magento setup:static-content:deploy --theme Rws/fonddecave en_US de_DE fr_FR</code> But error is coming --theme option does not exists. What is my mistake can any one help on this?

– Raghwendra Ojha
2 days ago













If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review

– Shoaib Munir
2 days ago





If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review

– Shoaib Munir
2 days ago













This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

– Teja Bhagavan Kollepara
2 days ago





This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

– Teja Bhagavan Kollepara
2 days ago










7 Answers
7






active

oldest

votes


















24














I'm afraid that you just can't deploy only one theme by magento console setup:static-content:deploy command.



I've been dealing with M2 frontend development for the last 2 weeks and I can affirm that the dev process it's a real PAIN! You'll lost a lot of time deploying changes due to complexity of less files hierarchy and themes fallbacks.



Anyway I'm Grunt by now here you'll find how to install, configure and use it, with Grunt you can deploy and/or recompile less files for a single theme.



So that approach it's ok if you are in "developer" mode because Grunt doesn't deploy images, fonts and javascript files to pub/static/... so magento will do it the first time required.




To activate developer mode, run:



php bin/magento deploy:mode:set developer



If you are looking for a way to deploy the entire content for a single theme in production I sorry to say that isn't possible.



BTW I'm pretty sure that it would be a nice Feature Request to make.



EDIT: Breaking News!



I found a way to deploy all changes a little faster:



  • Install Grunt + config your theme (one for each language)

  • after each change run:


    • grunt exec:theme_name // Clean folders and deploy less files

    • grunt less:theme_name // Process less files


Voila now you'll have all your changes deployed in Just(¿?) 12~16 sec, 12 sec is my personal record!



EDIT: Breaking News 2!



Confirmed! if you are making changes to a (already deployed) .less files just run grunt less:theme_name.



So, you have to run grunt exec:theme_nameonly when:



  • Add/Remove/Rename a *.less File

  • Add/Remove/Rename a *.js Fils

  • Add/Remove/Rename a *.css File

  • Add/Remove/Rename a image File

  • Add/Remove requirejs-config.js

Additionally I disabled blocks, layouts and full page Caches, so any change to templates and/or xml layouts will be displayed automatically.






share|improve this answer

























  • can you guid me how to make change in css through less i am stuck in topmenu. some item found but some are not but there css is there.. like .nav-sections child level0.

    – Qaisar Satti
    Feb 10 '16 at 7:35












  • It's a very large topic I recommend you to read (the entire) official guide (devdocs.magento.com/guides/v2.0/frontend-dev-guide/…). you must understand all lib > module > theme > fallback. As a starting point take a look at lib/web/css

    – MauroNigrele
    Feb 10 '16 at 7:53











  • You can see the UI Library documentation in your own store or here: magento2-demo.nexcess.net/pub/static/frontend/Magento/luma/… as well

    – MauroNigrele
    Feb 10 '16 at 7:54






  • 2





    What about when you edit a JS plugin? I found out that the changes were not getting reflected on the site. I had to remove the edited JS file from pub/static and redeploy (setup:static-content:deploy) for the changes to show.

    – thdoan
    Jun 28 '16 at 1:32











  • Not sure why this is the accepted answer, the one below is much better.

    – Tisch
    Jul 5 '18 at 14:10


















51














As of 2.1.1 you can now deploy specific themes or exclude themes:



Deploy specific themes:



php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme


Exclude themes:



php bin/magento setup:static-content:deploy --exclude-theme Magento/luma


enter image description here



Update these options are now in the documentation.






share|improve this answer

























  • it didn't work for me also it didn't mention in devdocs.magento.com/guides/v2.1/config-guide/cli/… There we just 2 options.

    – Adeel Ishfaq
    Sep 17 '16 at 11:19











  • @AdeelIshfaq Like so many other things, it is not yet documented, but it does work in 2.1.1. I attached a screenshot.

    – Mathew Tinsley
    Sep 17 '16 at 21:38











  • Submitted a pull request to have the new options added to the documentation: github.com/magento/devdocs/pull/827

    – Mathew Tinsley
    Sep 20 '16 at 1:57











  • @MathewTinsley, is it possible to deploy a specific frontend theme in all languages, and a specific backend theme only in one language? I don't need my backend in all languages..

    – bpoiss
    Aug 9 '18 at 12:01


















16














In Magento 2 you are able to content deploy specific themes and also exclude themes by this commands:



Content Deploy specific themes By this command:



php bin/magento setup:static-content:deploy --theme Vendor/firsttheme --theme Vendor/secondtheme


Exclude themes By this command:



php bin/magento setup:static-content:deploy --exclude-theme Vendor/yourtheme


If you need deploys static content for particular language (en_US), and exclude other theme, and need not minify HTML files then use this command:



magento setup:static-content:deploy en_US --exclude-theme Vendor/yourtheme --no-html-minify





share|improve this answer
































    2














    it seems that by now you have to deploy any language except en_US manually.
    i am working with 2.0.2 and develop-branch.






    share|improve this answer























    • You sir, are correct.

      – dchayka
      Sep 6 '17 at 23:58


















    2














    Here is shortcut to deploy only your theme




    -a for area



    -t for theme



    -l for language




    php bin/magento setup:static-content:deploy en_US -a frontend -t Magento/luma


    Source






    share|improve this answer























    • Shouldnt there be a -l before the en_US ?

      – James Harrington
      May 23 '18 at 12:56


















    1














    If your magento is in developer mode then deploy specific theme using below commands :



    Remove static content



    rm -rf pub/static/* /*to remove files excluding .htaccess*/

    rm -rf var/view_preprocessed/* /*to remove files excluding .htaccess*/


    And then



    php bin/magento setup:static-content:deploy -f --theme Vendor/theme


    OR



    php bin/magento s:s:d -f --theme Vendor/theme





    share|improve this answer
































      0














      To deploy an specific theme with an specific language:



      php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme pt_BR






      share|improve this answer























        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "479"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f101131%2fmagento2-how-can-i-deploy-my-theme-only%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        7 Answers
        7






        active

        oldest

        votes








        7 Answers
        7






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        24














        I'm afraid that you just can't deploy only one theme by magento console setup:static-content:deploy command.



        I've been dealing with M2 frontend development for the last 2 weeks and I can affirm that the dev process it's a real PAIN! You'll lost a lot of time deploying changes due to complexity of less files hierarchy and themes fallbacks.



        Anyway I'm Grunt by now here you'll find how to install, configure and use it, with Grunt you can deploy and/or recompile less files for a single theme.



        So that approach it's ok if you are in "developer" mode because Grunt doesn't deploy images, fonts and javascript files to pub/static/... so magento will do it the first time required.




        To activate developer mode, run:



        php bin/magento deploy:mode:set developer



        If you are looking for a way to deploy the entire content for a single theme in production I sorry to say that isn't possible.



        BTW I'm pretty sure that it would be a nice Feature Request to make.



        EDIT: Breaking News!



        I found a way to deploy all changes a little faster:



        • Install Grunt + config your theme (one for each language)

        • after each change run:


          • grunt exec:theme_name // Clean folders and deploy less files

          • grunt less:theme_name // Process less files


        Voila now you'll have all your changes deployed in Just(¿?) 12~16 sec, 12 sec is my personal record!



        EDIT: Breaking News 2!



        Confirmed! if you are making changes to a (already deployed) .less files just run grunt less:theme_name.



        So, you have to run grunt exec:theme_nameonly when:



        • Add/Remove/Rename a *.less File

        • Add/Remove/Rename a *.js Fils

        • Add/Remove/Rename a *.css File

        • Add/Remove/Rename a image File

        • Add/Remove requirejs-config.js

        Additionally I disabled blocks, layouts and full page Caches, so any change to templates and/or xml layouts will be displayed automatically.






        share|improve this answer

























        • can you guid me how to make change in css through less i am stuck in topmenu. some item found but some are not but there css is there.. like .nav-sections child level0.

          – Qaisar Satti
          Feb 10 '16 at 7:35












        • It's a very large topic I recommend you to read (the entire) official guide (devdocs.magento.com/guides/v2.0/frontend-dev-guide/…). you must understand all lib > module > theme > fallback. As a starting point take a look at lib/web/css

          – MauroNigrele
          Feb 10 '16 at 7:53











        • You can see the UI Library documentation in your own store or here: magento2-demo.nexcess.net/pub/static/frontend/Magento/luma/… as well

          – MauroNigrele
          Feb 10 '16 at 7:54






        • 2





          What about when you edit a JS plugin? I found out that the changes were not getting reflected on the site. I had to remove the edited JS file from pub/static and redeploy (setup:static-content:deploy) for the changes to show.

          – thdoan
          Jun 28 '16 at 1:32











        • Not sure why this is the accepted answer, the one below is much better.

          – Tisch
          Jul 5 '18 at 14:10















        24














        I'm afraid that you just can't deploy only one theme by magento console setup:static-content:deploy command.



        I've been dealing with M2 frontend development for the last 2 weeks and I can affirm that the dev process it's a real PAIN! You'll lost a lot of time deploying changes due to complexity of less files hierarchy and themes fallbacks.



        Anyway I'm Grunt by now here you'll find how to install, configure and use it, with Grunt you can deploy and/or recompile less files for a single theme.



        So that approach it's ok if you are in "developer" mode because Grunt doesn't deploy images, fonts and javascript files to pub/static/... so magento will do it the first time required.




        To activate developer mode, run:



        php bin/magento deploy:mode:set developer



        If you are looking for a way to deploy the entire content for a single theme in production I sorry to say that isn't possible.



        BTW I'm pretty sure that it would be a nice Feature Request to make.



        EDIT: Breaking News!



        I found a way to deploy all changes a little faster:



        • Install Grunt + config your theme (one for each language)

        • after each change run:


          • grunt exec:theme_name // Clean folders and deploy less files

          • grunt less:theme_name // Process less files


        Voila now you'll have all your changes deployed in Just(¿?) 12~16 sec, 12 sec is my personal record!



        EDIT: Breaking News 2!



        Confirmed! if you are making changes to a (already deployed) .less files just run grunt less:theme_name.



        So, you have to run grunt exec:theme_nameonly when:



        • Add/Remove/Rename a *.less File

        • Add/Remove/Rename a *.js Fils

        • Add/Remove/Rename a *.css File

        • Add/Remove/Rename a image File

        • Add/Remove requirejs-config.js

        Additionally I disabled blocks, layouts and full page Caches, so any change to templates and/or xml layouts will be displayed automatically.






        share|improve this answer

























        • can you guid me how to make change in css through less i am stuck in topmenu. some item found but some are not but there css is there.. like .nav-sections child level0.

          – Qaisar Satti
          Feb 10 '16 at 7:35












        • It's a very large topic I recommend you to read (the entire) official guide (devdocs.magento.com/guides/v2.0/frontend-dev-guide/…). you must understand all lib > module > theme > fallback. As a starting point take a look at lib/web/css

          – MauroNigrele
          Feb 10 '16 at 7:53











        • You can see the UI Library documentation in your own store or here: magento2-demo.nexcess.net/pub/static/frontend/Magento/luma/… as well

          – MauroNigrele
          Feb 10 '16 at 7:54






        • 2





          What about when you edit a JS plugin? I found out that the changes were not getting reflected on the site. I had to remove the edited JS file from pub/static and redeploy (setup:static-content:deploy) for the changes to show.

          – thdoan
          Jun 28 '16 at 1:32











        • Not sure why this is the accepted answer, the one below is much better.

          – Tisch
          Jul 5 '18 at 14:10













        24












        24








        24







        I'm afraid that you just can't deploy only one theme by magento console setup:static-content:deploy command.



        I've been dealing with M2 frontend development for the last 2 weeks and I can affirm that the dev process it's a real PAIN! You'll lost a lot of time deploying changes due to complexity of less files hierarchy and themes fallbacks.



        Anyway I'm Grunt by now here you'll find how to install, configure and use it, with Grunt you can deploy and/or recompile less files for a single theme.



        So that approach it's ok if you are in "developer" mode because Grunt doesn't deploy images, fonts and javascript files to pub/static/... so magento will do it the first time required.




        To activate developer mode, run:



        php bin/magento deploy:mode:set developer



        If you are looking for a way to deploy the entire content for a single theme in production I sorry to say that isn't possible.



        BTW I'm pretty sure that it would be a nice Feature Request to make.



        EDIT: Breaking News!



        I found a way to deploy all changes a little faster:



        • Install Grunt + config your theme (one for each language)

        • after each change run:


          • grunt exec:theme_name // Clean folders and deploy less files

          • grunt less:theme_name // Process less files


        Voila now you'll have all your changes deployed in Just(¿?) 12~16 sec, 12 sec is my personal record!



        EDIT: Breaking News 2!



        Confirmed! if you are making changes to a (already deployed) .less files just run grunt less:theme_name.



        So, you have to run grunt exec:theme_nameonly when:



        • Add/Remove/Rename a *.less File

        • Add/Remove/Rename a *.js Fils

        • Add/Remove/Rename a *.css File

        • Add/Remove/Rename a image File

        • Add/Remove requirejs-config.js

        Additionally I disabled blocks, layouts and full page Caches, so any change to templates and/or xml layouts will be displayed automatically.






        share|improve this answer















        I'm afraid that you just can't deploy only one theme by magento console setup:static-content:deploy command.



        I've been dealing with M2 frontend development for the last 2 weeks and I can affirm that the dev process it's a real PAIN! You'll lost a lot of time deploying changes due to complexity of less files hierarchy and themes fallbacks.



        Anyway I'm Grunt by now here you'll find how to install, configure and use it, with Grunt you can deploy and/or recompile less files for a single theme.



        So that approach it's ok if you are in "developer" mode because Grunt doesn't deploy images, fonts and javascript files to pub/static/... so magento will do it the first time required.




        To activate developer mode, run:



        php bin/magento deploy:mode:set developer



        If you are looking for a way to deploy the entire content for a single theme in production I sorry to say that isn't possible.



        BTW I'm pretty sure that it would be a nice Feature Request to make.



        EDIT: Breaking News!



        I found a way to deploy all changes a little faster:



        • Install Grunt + config your theme (one for each language)

        • after each change run:


          • grunt exec:theme_name // Clean folders and deploy less files

          • grunt less:theme_name // Process less files


        Voila now you'll have all your changes deployed in Just(¿?) 12~16 sec, 12 sec is my personal record!



        EDIT: Breaking News 2!



        Confirmed! if you are making changes to a (already deployed) .less files just run grunt less:theme_name.



        So, you have to run grunt exec:theme_nameonly when:



        • Add/Remove/Rename a *.less File

        • Add/Remove/Rename a *.js Fils

        • Add/Remove/Rename a *.css File

        • Add/Remove/Rename a image File

        • Add/Remove requirejs-config.js

        Additionally I disabled blocks, layouts and full page Caches, so any change to templates and/or xml layouts will be displayed automatically.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jun 28 '16 at 12:11









        Fabian Schmengler

        55.4k21139354




        55.4k21139354










        answered Feb 10 '16 at 7:12









        MauroNigreleMauroNigrele

        2,615926




        2,615926












        • can you guid me how to make change in css through less i am stuck in topmenu. some item found but some are not but there css is there.. like .nav-sections child level0.

          – Qaisar Satti
          Feb 10 '16 at 7:35












        • It's a very large topic I recommend you to read (the entire) official guide (devdocs.magento.com/guides/v2.0/frontend-dev-guide/…). you must understand all lib > module > theme > fallback. As a starting point take a look at lib/web/css

          – MauroNigrele
          Feb 10 '16 at 7:53











        • You can see the UI Library documentation in your own store or here: magento2-demo.nexcess.net/pub/static/frontend/Magento/luma/… as well

          – MauroNigrele
          Feb 10 '16 at 7:54






        • 2





          What about when you edit a JS plugin? I found out that the changes were not getting reflected on the site. I had to remove the edited JS file from pub/static and redeploy (setup:static-content:deploy) for the changes to show.

          – thdoan
          Jun 28 '16 at 1:32











        • Not sure why this is the accepted answer, the one below is much better.

          – Tisch
          Jul 5 '18 at 14:10

















        • can you guid me how to make change in css through less i am stuck in topmenu. some item found but some are not but there css is there.. like .nav-sections child level0.

          – Qaisar Satti
          Feb 10 '16 at 7:35












        • It's a very large topic I recommend you to read (the entire) official guide (devdocs.magento.com/guides/v2.0/frontend-dev-guide/…). you must understand all lib > module > theme > fallback. As a starting point take a look at lib/web/css

          – MauroNigrele
          Feb 10 '16 at 7:53











        • You can see the UI Library documentation in your own store or here: magento2-demo.nexcess.net/pub/static/frontend/Magento/luma/… as well

          – MauroNigrele
          Feb 10 '16 at 7:54






        • 2





          What about when you edit a JS plugin? I found out that the changes were not getting reflected on the site. I had to remove the edited JS file from pub/static and redeploy (setup:static-content:deploy) for the changes to show.

          – thdoan
          Jun 28 '16 at 1:32











        • Not sure why this is the accepted answer, the one below is much better.

          – Tisch
          Jul 5 '18 at 14:10
















        can you guid me how to make change in css through less i am stuck in topmenu. some item found but some are not but there css is there.. like .nav-sections child level0.

        – Qaisar Satti
        Feb 10 '16 at 7:35






        can you guid me how to make change in css through less i am stuck in topmenu. some item found but some are not but there css is there.. like .nav-sections child level0.

        – Qaisar Satti
        Feb 10 '16 at 7:35














        It's a very large topic I recommend you to read (the entire) official guide (devdocs.magento.com/guides/v2.0/frontend-dev-guide/…). you must understand all lib > module > theme > fallback. As a starting point take a look at lib/web/css

        – MauroNigrele
        Feb 10 '16 at 7:53





        It's a very large topic I recommend you to read (the entire) official guide (devdocs.magento.com/guides/v2.0/frontend-dev-guide/…). you must understand all lib > module > theme > fallback. As a starting point take a look at lib/web/css

        – MauroNigrele
        Feb 10 '16 at 7:53













        You can see the UI Library documentation in your own store or here: magento2-demo.nexcess.net/pub/static/frontend/Magento/luma/… as well

        – MauroNigrele
        Feb 10 '16 at 7:54





        You can see the UI Library documentation in your own store or here: magento2-demo.nexcess.net/pub/static/frontend/Magento/luma/… as well

        – MauroNigrele
        Feb 10 '16 at 7:54




        2




        2





        What about when you edit a JS plugin? I found out that the changes were not getting reflected on the site. I had to remove the edited JS file from pub/static and redeploy (setup:static-content:deploy) for the changes to show.

        – thdoan
        Jun 28 '16 at 1:32





        What about when you edit a JS plugin? I found out that the changes were not getting reflected on the site. I had to remove the edited JS file from pub/static and redeploy (setup:static-content:deploy) for the changes to show.

        – thdoan
        Jun 28 '16 at 1:32













        Not sure why this is the accepted answer, the one below is much better.

        – Tisch
        Jul 5 '18 at 14:10





        Not sure why this is the accepted answer, the one below is much better.

        – Tisch
        Jul 5 '18 at 14:10













        51














        As of 2.1.1 you can now deploy specific themes or exclude themes:



        Deploy specific themes:



        php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme


        Exclude themes:



        php bin/magento setup:static-content:deploy --exclude-theme Magento/luma


        enter image description here



        Update these options are now in the documentation.






        share|improve this answer

























        • it didn't work for me also it didn't mention in devdocs.magento.com/guides/v2.1/config-guide/cli/… There we just 2 options.

          – Adeel Ishfaq
          Sep 17 '16 at 11:19











        • @AdeelIshfaq Like so many other things, it is not yet documented, but it does work in 2.1.1. I attached a screenshot.

          – Mathew Tinsley
          Sep 17 '16 at 21:38











        • Submitted a pull request to have the new options added to the documentation: github.com/magento/devdocs/pull/827

          – Mathew Tinsley
          Sep 20 '16 at 1:57











        • @MathewTinsley, is it possible to deploy a specific frontend theme in all languages, and a specific backend theme only in one language? I don't need my backend in all languages..

          – bpoiss
          Aug 9 '18 at 12:01















        51














        As of 2.1.1 you can now deploy specific themes or exclude themes:



        Deploy specific themes:



        php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme


        Exclude themes:



        php bin/magento setup:static-content:deploy --exclude-theme Magento/luma


        enter image description here



        Update these options are now in the documentation.






        share|improve this answer

























        • it didn't work for me also it didn't mention in devdocs.magento.com/guides/v2.1/config-guide/cli/… There we just 2 options.

          – Adeel Ishfaq
          Sep 17 '16 at 11:19











        • @AdeelIshfaq Like so many other things, it is not yet documented, but it does work in 2.1.1. I attached a screenshot.

          – Mathew Tinsley
          Sep 17 '16 at 21:38











        • Submitted a pull request to have the new options added to the documentation: github.com/magento/devdocs/pull/827

          – Mathew Tinsley
          Sep 20 '16 at 1:57











        • @MathewTinsley, is it possible to deploy a specific frontend theme in all languages, and a specific backend theme only in one language? I don't need my backend in all languages..

          – bpoiss
          Aug 9 '18 at 12:01













        51












        51








        51







        As of 2.1.1 you can now deploy specific themes or exclude themes:



        Deploy specific themes:



        php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme


        Exclude themes:



        php bin/magento setup:static-content:deploy --exclude-theme Magento/luma


        enter image description here



        Update these options are now in the documentation.






        share|improve this answer















        As of 2.1.1 you can now deploy specific themes or exclude themes:



        Deploy specific themes:



        php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme


        Exclude themes:



        php bin/magento setup:static-content:deploy --exclude-theme Magento/luma


        enter image description here



        Update these options are now in the documentation.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 20 '16 at 1:58

























        answered Sep 8 '16 at 1:39









        Mathew TinsleyMathew Tinsley

        623157




        623157












        • it didn't work for me also it didn't mention in devdocs.magento.com/guides/v2.1/config-guide/cli/… There we just 2 options.

          – Adeel Ishfaq
          Sep 17 '16 at 11:19











        • @AdeelIshfaq Like so many other things, it is not yet documented, but it does work in 2.1.1. I attached a screenshot.

          – Mathew Tinsley
          Sep 17 '16 at 21:38











        • Submitted a pull request to have the new options added to the documentation: github.com/magento/devdocs/pull/827

          – Mathew Tinsley
          Sep 20 '16 at 1:57











        • @MathewTinsley, is it possible to deploy a specific frontend theme in all languages, and a specific backend theme only in one language? I don't need my backend in all languages..

          – bpoiss
          Aug 9 '18 at 12:01

















        • it didn't work for me also it didn't mention in devdocs.magento.com/guides/v2.1/config-guide/cli/… There we just 2 options.

          – Adeel Ishfaq
          Sep 17 '16 at 11:19











        • @AdeelIshfaq Like so many other things, it is not yet documented, but it does work in 2.1.1. I attached a screenshot.

          – Mathew Tinsley
          Sep 17 '16 at 21:38











        • Submitted a pull request to have the new options added to the documentation: github.com/magento/devdocs/pull/827

          – Mathew Tinsley
          Sep 20 '16 at 1:57











        • @MathewTinsley, is it possible to deploy a specific frontend theme in all languages, and a specific backend theme only in one language? I don't need my backend in all languages..

          – bpoiss
          Aug 9 '18 at 12:01
















        it didn't work for me also it didn't mention in devdocs.magento.com/guides/v2.1/config-guide/cli/… There we just 2 options.

        – Adeel Ishfaq
        Sep 17 '16 at 11:19





        it didn't work for me also it didn't mention in devdocs.magento.com/guides/v2.1/config-guide/cli/… There we just 2 options.

        – Adeel Ishfaq
        Sep 17 '16 at 11:19













        @AdeelIshfaq Like so many other things, it is not yet documented, but it does work in 2.1.1. I attached a screenshot.

        – Mathew Tinsley
        Sep 17 '16 at 21:38





        @AdeelIshfaq Like so many other things, it is not yet documented, but it does work in 2.1.1. I attached a screenshot.

        – Mathew Tinsley
        Sep 17 '16 at 21:38













        Submitted a pull request to have the new options added to the documentation: github.com/magento/devdocs/pull/827

        – Mathew Tinsley
        Sep 20 '16 at 1:57





        Submitted a pull request to have the new options added to the documentation: github.com/magento/devdocs/pull/827

        – Mathew Tinsley
        Sep 20 '16 at 1:57













        @MathewTinsley, is it possible to deploy a specific frontend theme in all languages, and a specific backend theme only in one language? I don't need my backend in all languages..

        – bpoiss
        Aug 9 '18 at 12:01





        @MathewTinsley, is it possible to deploy a specific frontend theme in all languages, and a specific backend theme only in one language? I don't need my backend in all languages..

        – bpoiss
        Aug 9 '18 at 12:01











        16














        In Magento 2 you are able to content deploy specific themes and also exclude themes by this commands:



        Content Deploy specific themes By this command:



        php bin/magento setup:static-content:deploy --theme Vendor/firsttheme --theme Vendor/secondtheme


        Exclude themes By this command:



        php bin/magento setup:static-content:deploy --exclude-theme Vendor/yourtheme


        If you need deploys static content for particular language (en_US), and exclude other theme, and need not minify HTML files then use this command:



        magento setup:static-content:deploy en_US --exclude-theme Vendor/yourtheme --no-html-minify





        share|improve this answer





























          16














          In Magento 2 you are able to content deploy specific themes and also exclude themes by this commands:



          Content Deploy specific themes By this command:



          php bin/magento setup:static-content:deploy --theme Vendor/firsttheme --theme Vendor/secondtheme


          Exclude themes By this command:



          php bin/magento setup:static-content:deploy --exclude-theme Vendor/yourtheme


          If you need deploys static content for particular language (en_US), and exclude other theme, and need not minify HTML files then use this command:



          magento setup:static-content:deploy en_US --exclude-theme Vendor/yourtheme --no-html-minify





          share|improve this answer



























            16












            16








            16







            In Magento 2 you are able to content deploy specific themes and also exclude themes by this commands:



            Content Deploy specific themes By this command:



            php bin/magento setup:static-content:deploy --theme Vendor/firsttheme --theme Vendor/secondtheme


            Exclude themes By this command:



            php bin/magento setup:static-content:deploy --exclude-theme Vendor/yourtheme


            If you need deploys static content for particular language (en_US), and exclude other theme, and need not minify HTML files then use this command:



            magento setup:static-content:deploy en_US --exclude-theme Vendor/yourtheme --no-html-minify





            share|improve this answer















            In Magento 2 you are able to content deploy specific themes and also exclude themes by this commands:



            Content Deploy specific themes By this command:



            php bin/magento setup:static-content:deploy --theme Vendor/firsttheme --theme Vendor/secondtheme


            Exclude themes By this command:



            php bin/magento setup:static-content:deploy --exclude-theme Vendor/yourtheme


            If you need deploys static content for particular language (en_US), and exclude other theme, and need not minify HTML files then use this command:



            magento setup:static-content:deploy en_US --exclude-theme Vendor/yourtheme --no-html-minify






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 14 '17 at 12:53

























            answered Jan 17 '17 at 5:49









            Prince PatelPrince Patel

            14.7k65481




            14.7k65481





















                2














                it seems that by now you have to deploy any language except en_US manually.
                i am working with 2.0.2 and develop-branch.






                share|improve this answer























                • You sir, are correct.

                  – dchayka
                  Sep 6 '17 at 23:58















                2














                it seems that by now you have to deploy any language except en_US manually.
                i am working with 2.0.2 and develop-branch.






                share|improve this answer























                • You sir, are correct.

                  – dchayka
                  Sep 6 '17 at 23:58













                2












                2








                2







                it seems that by now you have to deploy any language except en_US manually.
                i am working with 2.0.2 and develop-branch.






                share|improve this answer













                it seems that by now you have to deploy any language except en_US manually.
                i am working with 2.0.2 and develop-branch.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 23 '16 at 14:11









                Gunther HebeinGunther Hebein

                212




                212












                • You sir, are correct.

                  – dchayka
                  Sep 6 '17 at 23:58

















                • You sir, are correct.

                  – dchayka
                  Sep 6 '17 at 23:58
















                You sir, are correct.

                – dchayka
                Sep 6 '17 at 23:58





                You sir, are correct.

                – dchayka
                Sep 6 '17 at 23:58











                2














                Here is shortcut to deploy only your theme




                -a for area



                -t for theme



                -l for language




                php bin/magento setup:static-content:deploy en_US -a frontend -t Magento/luma


                Source






                share|improve this answer























                • Shouldnt there be a -l before the en_US ?

                  – James Harrington
                  May 23 '18 at 12:56















                2














                Here is shortcut to deploy only your theme




                -a for area



                -t for theme



                -l for language




                php bin/magento setup:static-content:deploy en_US -a frontend -t Magento/luma


                Source






                share|improve this answer























                • Shouldnt there be a -l before the en_US ?

                  – James Harrington
                  May 23 '18 at 12:56













                2












                2








                2







                Here is shortcut to deploy only your theme




                -a for area



                -t for theme



                -l for language




                php bin/magento setup:static-content:deploy en_US -a frontend -t Magento/luma


                Source






                share|improve this answer













                Here is shortcut to deploy only your theme




                -a for area



                -t for theme



                -l for language




                php bin/magento setup:static-content:deploy en_US -a frontend -t Magento/luma


                Source







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 12 '18 at 9:50









                Qaisar SattiQaisar Satti

                27.2k1258110




                27.2k1258110












                • Shouldnt there be a -l before the en_US ?

                  – James Harrington
                  May 23 '18 at 12:56

















                • Shouldnt there be a -l before the en_US ?

                  – James Harrington
                  May 23 '18 at 12:56
















                Shouldnt there be a -l before the en_US ?

                – James Harrington
                May 23 '18 at 12:56





                Shouldnt there be a -l before the en_US ?

                – James Harrington
                May 23 '18 at 12:56











                1














                If your magento is in developer mode then deploy specific theme using below commands :



                Remove static content



                rm -rf pub/static/* /*to remove files excluding .htaccess*/

                rm -rf var/view_preprocessed/* /*to remove files excluding .htaccess*/


                And then



                php bin/magento setup:static-content:deploy -f --theme Vendor/theme


                OR



                php bin/magento s:s:d -f --theme Vendor/theme





                share|improve this answer





























                  1














                  If your magento is in developer mode then deploy specific theme using below commands :



                  Remove static content



                  rm -rf pub/static/* /*to remove files excluding .htaccess*/

                  rm -rf var/view_preprocessed/* /*to remove files excluding .htaccess*/


                  And then



                  php bin/magento setup:static-content:deploy -f --theme Vendor/theme


                  OR



                  php bin/magento s:s:d -f --theme Vendor/theme





                  share|improve this answer



























                    1












                    1








                    1







                    If your magento is in developer mode then deploy specific theme using below commands :



                    Remove static content



                    rm -rf pub/static/* /*to remove files excluding .htaccess*/

                    rm -rf var/view_preprocessed/* /*to remove files excluding .htaccess*/


                    And then



                    php bin/magento setup:static-content:deploy -f --theme Vendor/theme


                    OR



                    php bin/magento s:s:d -f --theme Vendor/theme





                    share|improve this answer















                    If your magento is in developer mode then deploy specific theme using below commands :



                    Remove static content



                    rm -rf pub/static/* /*to remove files excluding .htaccess*/

                    rm -rf var/view_preprocessed/* /*to remove files excluding .htaccess*/


                    And then



                    php bin/magento setup:static-content:deploy -f --theme Vendor/theme


                    OR



                    php bin/magento s:s:d -f --theme Vendor/theme






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 24 at 9:07

























                    answered Jul 11 '18 at 10:24









                    Amatya TrivediAmatya Trivedi

                    539




                    539





















                        0














                        To deploy an specific theme with an specific language:



                        php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme pt_BR






                        share|improve this answer



























                          0














                          To deploy an specific theme with an specific language:



                          php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme pt_BR






                          share|improve this answer

























                            0












                            0








                            0







                            To deploy an specific theme with an specific language:



                            php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme pt_BR






                            share|improve this answer













                            To deploy an specific theme with an specific language:



                            php bin/magento setup:static-content:deploy --theme Magento/backend --theme Vendor/mytheme pt_BR







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered May 18 '17 at 9:53









                            NahidNahid

                            500612




                            500612



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Magento Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f101131%2fmagento2-how-can-i-deploy-my-theme-only%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                                Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                                Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form