When to run compile command in Magento?Magento 2: When should I run which commands?I run php bin/magento module:enable, page stops loading after thatMagento2 - setup:di:compileMagento2 deploy command not working and rest commands are workingMagento compile error php bin/magento setup:di:compileMagento 2 run setup:di:compile command on a shared hosting with limited memory_limit (max 512M)Magento2: php bin/magento setup:di:compile issuefatal error on compile commandMagento2: impossible run command in terminal setup:di:compileWhen to compile and deploy contentMagento2 which command Run and when to Run

Watching something be written to a file live with tail

What exploit are these user agents trying to use?

Is it possible to download Internet Explorer on my Mac running OS X El Capitan?

What is going on with Captain Marvel's blood colour?

What is the PIE reconstruction for word-initial alpha with rough breathing?

What's the difference between 'rename' and 'mv'?

prove that the matrix A is diagonalizable

What mechanic is there to disable a threat instead of killing it?

Twin primes whose sum is a cube

Can I use a neutral wire from another outlet to repair a broken neutral?

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

How to show the equivalence between the regularized regression and their constraint formulas using KKT

Alternative to sending password over mail?

Does a druid starting with a bow start with no arrows?

How could indestructible materials be used in power generation?

How can I make my BBEG immortal short of making them a Lich or Vampire?

How to draw the figure with four pentagons?

What does it mean to describe someone as a butt steak?

Did converts (ger tzedek) in ancient Israel own land?

What's the point of deactivating Num Lock on login screens?

What is the word for reserving something for yourself before others do?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Western buddy movie with a supernatural twist where a woman turns into an eagle at the end

Can a rocket refuel on Mars from water?



When to run compile command in Magento?


Magento 2: When should I run which commands?I run php bin/magento module:enable, page stops loading after thatMagento2 - setup:di:compileMagento2 deploy command not working and rest commands are workingMagento compile error php bin/magento setup:di:compileMagento 2 run setup:di:compile command on a shared hosting with limited memory_limit (max 512M)Magento2: php bin/magento setup:di:compile issuefatal error on compile commandMagento2: impossible run command in terminal setup:di:compileWhen to compile and deploy contentMagento2 which command Run and when to Run






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








0















I have updated the CSS for our site.



After updating, I ran the below commands:



php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush


But the changes are not applied when I check the front-end of our site. So, I ran the below command:



php bin/magento setup:di:compile


I also ran the above said 2 commands after this. Now, I can see the changes in the front-end.



So, In this case, do I need to run compile command whenever I make any changes in CSS.



Your help will be greatly appreciated.










share|improve this question






























    0















    I have updated the CSS for our site.



    After updating, I ran the below commands:



    php bin/magento setup:static-content:deploy -f
    php bin/magento cache:flush


    But the changes are not applied when I check the front-end of our site. So, I ran the below command:



    php bin/magento setup:di:compile


    I also ran the above said 2 commands after this. Now, I can see the changes in the front-end.



    So, In this case, do I need to run compile command whenever I make any changes in CSS.



    Your help will be greatly appreciated.










    share|improve this question


























      0












      0








      0








      I have updated the CSS for our site.



      After updating, I ran the below commands:



      php bin/magento setup:static-content:deploy -f
      php bin/magento cache:flush


      But the changes are not applied when I check the front-end of our site. So, I ran the below command:



      php bin/magento setup:di:compile


      I also ran the above said 2 commands after this. Now, I can see the changes in the front-end.



      So, In this case, do I need to run compile command whenever I make any changes in CSS.



      Your help will be greatly appreciated.










      share|improve this question
















      I have updated the CSS for our site.



      After updating, I ran the below commands:



      php bin/magento setup:static-content:deploy -f
      php bin/magento cache:flush


      But the changes are not applied when I check the front-end of our site. So, I ran the below command:



      php bin/magento setup:di:compile


      I also ran the above said 2 commands after this. Now, I can see the changes in the front-end.



      So, In this case, do I need to run compile command whenever I make any changes in CSS.



      Your help will be greatly appreciated.







      setup-di-compile command






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago









      ABHISHEK TRIPATHI

      2,1241828




      2,1241828










      asked 2 days ago









      Magento vsmarttecMagento vsmarttec

      31619




      31619




















          3 Answers
          3






          active

          oldest

          votes


















          1














          When you are making any changes related to Html, CSS, or js file & you are into the developer mode then you need to run the only below two commands:



          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          These commands will generate your changes if it is not generating the changes it means there is some problem with the server in the file generation this is the old problem magento facing many times it is some times because of the cache also.



          The alternative for this & when you are in the production mode is you can delete the
          var/view_preprocessed/, var/composer_home/cache/, var/cache/, var/page_cache/, pub/static/frontend folders & then deploy the static content for that run the below command



          rm -rf var/view_preprocessed/ var/composer_home/cache/ var/cache/ var/page_cache/ pub/static/frontend
          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          If you are making the CSS changes & for that if you are writting the less files then you can run the grunt command for the compilation of the less to css & using it you don't need to run the above commands. You can refer this devdocs for it.



          To know when to run which commands you can refer this answer Magento 2: When should I run which commands?






          share|improve this answer

























          • Perfectly working. Thanks!

            – Magento vsmarttec
            2 days ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            2 days ago


















          0














          No.



          setup:di:compile creates the generated PHP-classes used by Magento2 (Interceptors, Factories, ...)



          This command also clears some generated files.



          setup:static-content:deploy will regenerate all CSS. But you normally do not need this when developing. Make sure you are in the developer mode.






          share|improve this answer























          • Yes, I'm in the developer mode.

            – Magento vsmarttec
            2 days ago


















          0















          Yes you will need to run bin/magento setup:di:compile
          when you added new classes with dependencies (constructor parameters)
          or changed dependencies of existing classes.(di.xml)




          Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.




          While developing your extension in magento 2 and upper versions
          whenever you change any custom logic or some front end side operations
          there is no need to run this command . But if you change something in
          either di.xml or class ,factory method etc etc ... then you must
          need to run this command.




          Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html






          share|improve this answer

























          • that's just wrong... you do NOT need to run it everytime

            – Philipp Sander
            2 days ago











          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%2f268289%2fwhen-to-run-compile-command-in-magento%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          When you are making any changes related to Html, CSS, or js file & you are into the developer mode then you need to run the only below two commands:



          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          These commands will generate your changes if it is not generating the changes it means there is some problem with the server in the file generation this is the old problem magento facing many times it is some times because of the cache also.



          The alternative for this & when you are in the production mode is you can delete the
          var/view_preprocessed/, var/composer_home/cache/, var/cache/, var/page_cache/, pub/static/frontend folders & then deploy the static content for that run the below command



          rm -rf var/view_preprocessed/ var/composer_home/cache/ var/cache/ var/page_cache/ pub/static/frontend
          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          If you are making the CSS changes & for that if you are writting the less files then you can run the grunt command for the compilation of the less to css & using it you don't need to run the above commands. You can refer this devdocs for it.



          To know when to run which commands you can refer this answer Magento 2: When should I run which commands?






          share|improve this answer

























          • Perfectly working. Thanks!

            – Magento vsmarttec
            2 days ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            2 days ago















          1














          When you are making any changes related to Html, CSS, or js file & you are into the developer mode then you need to run the only below two commands:



          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          These commands will generate your changes if it is not generating the changes it means there is some problem with the server in the file generation this is the old problem magento facing many times it is some times because of the cache also.



          The alternative for this & when you are in the production mode is you can delete the
          var/view_preprocessed/, var/composer_home/cache/, var/cache/, var/page_cache/, pub/static/frontend folders & then deploy the static content for that run the below command



          rm -rf var/view_preprocessed/ var/composer_home/cache/ var/cache/ var/page_cache/ pub/static/frontend
          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          If you are making the CSS changes & for that if you are writting the less files then you can run the grunt command for the compilation of the less to css & using it you don't need to run the above commands. You can refer this devdocs for it.



          To know when to run which commands you can refer this answer Magento 2: When should I run which commands?






          share|improve this answer

























          • Perfectly working. Thanks!

            – Magento vsmarttec
            2 days ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            2 days ago













          1












          1








          1







          When you are making any changes related to Html, CSS, or js file & you are into the developer mode then you need to run the only below two commands:



          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          These commands will generate your changes if it is not generating the changes it means there is some problem with the server in the file generation this is the old problem magento facing many times it is some times because of the cache also.



          The alternative for this & when you are in the production mode is you can delete the
          var/view_preprocessed/, var/composer_home/cache/, var/cache/, var/page_cache/, pub/static/frontend folders & then deploy the static content for that run the below command



          rm -rf var/view_preprocessed/ var/composer_home/cache/ var/cache/ var/page_cache/ pub/static/frontend
          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          If you are making the CSS changes & for that if you are writting the less files then you can run the grunt command for the compilation of the less to css & using it you don't need to run the above commands. You can refer this devdocs for it.



          To know when to run which commands you can refer this answer Magento 2: When should I run which commands?






          share|improve this answer















          When you are making any changes related to Html, CSS, or js file & you are into the developer mode then you need to run the only below two commands:



          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          These commands will generate your changes if it is not generating the changes it means there is some problem with the server in the file generation this is the old problem magento facing many times it is some times because of the cache also.



          The alternative for this & when you are in the production mode is you can delete the
          var/view_preprocessed/, var/composer_home/cache/, var/cache/, var/page_cache/, pub/static/frontend folders & then deploy the static content for that run the below command



          rm -rf var/view_preprocessed/ var/composer_home/cache/ var/cache/ var/page_cache/ pub/static/frontend
          php bin/magento setup:static-content:deploy -f
          php bin/magento cache:flush


          If you are making the CSS changes & for that if you are writting the less files then you can run the grunt command for the compilation of the less to css & using it you don't need to run the above commands. You can refer this devdocs for it.



          To know when to run which commands you can refer this answer Magento 2: When should I run which commands?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered 2 days ago









          ABHISHEK TRIPATHIABHISHEK TRIPATHI

          2,1241828




          2,1241828












          • Perfectly working. Thanks!

            – Magento vsmarttec
            2 days ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            2 days ago

















          • Perfectly working. Thanks!

            – Magento vsmarttec
            2 days ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            2 days ago
















          Perfectly working. Thanks!

          – Magento vsmarttec
          2 days ago





          Perfectly working. Thanks!

          – Magento vsmarttec
          2 days ago













          You are always welcome happy coding! ;)

          – ABHISHEK TRIPATHI
          2 days ago





          You are always welcome happy coding! ;)

          – ABHISHEK TRIPATHI
          2 days ago













          0














          No.



          setup:di:compile creates the generated PHP-classes used by Magento2 (Interceptors, Factories, ...)



          This command also clears some generated files.



          setup:static-content:deploy will regenerate all CSS. But you normally do not need this when developing. Make sure you are in the developer mode.






          share|improve this answer























          • Yes, I'm in the developer mode.

            – Magento vsmarttec
            2 days ago















          0














          No.



          setup:di:compile creates the generated PHP-classes used by Magento2 (Interceptors, Factories, ...)



          This command also clears some generated files.



          setup:static-content:deploy will regenerate all CSS. But you normally do not need this when developing. Make sure you are in the developer mode.






          share|improve this answer























          • Yes, I'm in the developer mode.

            – Magento vsmarttec
            2 days ago













          0












          0








          0







          No.



          setup:di:compile creates the generated PHP-classes used by Magento2 (Interceptors, Factories, ...)



          This command also clears some generated files.



          setup:static-content:deploy will regenerate all CSS. But you normally do not need this when developing. Make sure you are in the developer mode.






          share|improve this answer













          No.



          setup:di:compile creates the generated PHP-classes used by Magento2 (Interceptors, Factories, ...)



          This command also clears some generated files.



          setup:static-content:deploy will regenerate all CSS. But you normally do not need this when developing. Make sure you are in the developer mode.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          Philipp SanderPhilipp Sander

          6731521




          6731521












          • Yes, I'm in the developer mode.

            – Magento vsmarttec
            2 days ago

















          • Yes, I'm in the developer mode.

            – Magento vsmarttec
            2 days ago
















          Yes, I'm in the developer mode.

          – Magento vsmarttec
          2 days ago





          Yes, I'm in the developer mode.

          – Magento vsmarttec
          2 days ago











          0















          Yes you will need to run bin/magento setup:di:compile
          when you added new classes with dependencies (constructor parameters)
          or changed dependencies of existing classes.(di.xml)




          Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.




          While developing your extension in magento 2 and upper versions
          whenever you change any custom logic or some front end side operations
          there is no need to run this command . But if you change something in
          either di.xml or class ,factory method etc etc ... then you must
          need to run this command.




          Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html






          share|improve this answer

























          • that's just wrong... you do NOT need to run it everytime

            – Philipp Sander
            2 days ago















          0















          Yes you will need to run bin/magento setup:di:compile
          when you added new classes with dependencies (constructor parameters)
          or changed dependencies of existing classes.(di.xml)




          Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.




          While developing your extension in magento 2 and upper versions
          whenever you change any custom logic or some front end side operations
          there is no need to run this command . But if you change something in
          either di.xml or class ,factory method etc etc ... then you must
          need to run this command.




          Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html






          share|improve this answer

























          • that's just wrong... you do NOT need to run it everytime

            – Philipp Sander
            2 days ago













          0












          0








          0








          Yes you will need to run bin/magento setup:di:compile
          when you added new classes with dependencies (constructor parameters)
          or changed dependencies of existing classes.(di.xml)




          Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.




          While developing your extension in magento 2 and upper versions
          whenever you change any custom logic or some front end side operations
          there is no need to run this command . But if you change something in
          either di.xml or class ,factory method etc etc ... then you must
          need to run this command.




          Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html






          share|improve this answer
















          Yes you will need to run bin/magento setup:di:compile
          when you added new classes with dependencies (constructor parameters)
          or changed dependencies of existing classes.(di.xml)




          Another main thing here is Code compilation. setup:di:compile command compiles your code everytime. its compile the code and check is there any error in that code or not , if error is there it will show directly on the command prompt in red color.




          While developing your extension in magento 2 and upper versions
          whenever you change any custom logic or some front end side operations
          there is no need to run this command . But if you change something in
          either di.xml or class ,factory method etc etc ... then you must
          need to run this command.




          Refer this link for more details - http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-compiler.html







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered 2 days ago









          Ronak RathodRonak Rathod

          1,072213




          1,072213












          • that's just wrong... you do NOT need to run it everytime

            – Philipp Sander
            2 days ago

















          • that's just wrong... you do NOT need to run it everytime

            – Philipp Sander
            2 days ago
















          that's just wrong... you do NOT need to run it everytime

          – Philipp Sander
          2 days ago





          that's just wrong... you do NOT need to run it everytime

          – Philipp Sander
          2 days ago

















          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%2f268289%2fwhen-to-run-compile-command-in-magento%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

          Sum ergo cogito? 1 nng

          三茅街道4182Guuntc Dn precexpngmageondP