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

Placement of More Information/Help Icon button for Radio Buttons

Do creatures with a speed 0ft., fly 30ft. (hover) ever touch the ground?

What is required to make GPS signals available indoors?

Send out email when Apex Queueable fails and test it

In Bayesian inference, why are some terms dropped from the posterior predictive?

OP Amp not amplifying audio signal

Should I tell management that I intend to leave due to bad software development practices?

Can someone clarify Hamming's notion of important problems in relation to modern academia?

Does the Idaho Potato Commission associate potato skins with healthy eating?

How to stretch the corners of this image so that it looks like a perfect rectangle?

Where would I need my direct neural interface to be implanted?

Does marriage to a non-Numenorean disqualify a candidate for the crown of Gondor?

How do I exit BASH while loop using modulus operator?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

How can saying a song's name be a copyright violation?

Standard deduction V. mortgage interest deduction - is it basically only for the rich?

Why was Sir Cadogan fired?

What's the meaning of "Sollensaussagen"?

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

Why are UK visa biometrics appointments suspended at USCIS Application Support Centers?

Processor speed limited at 0.4 Ghz

Could the museum Saturn V's be refitted for one more flight?

how do we prove that a sum of two periods is still a period?

Is there a hemisphere-neutral way of specifying a season?



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













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 14 hours ago









      ABHISHEK TRIPATHI

      2,0611728




      2,0611728










      asked 16 hours 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
            14 hours ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            14 hours 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
            16 hours 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
            16 hours 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
            14 hours ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            14 hours 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
            14 hours ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            14 hours 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 15 hours ago

























          answered 15 hours ago









          ABHISHEK TRIPATHIABHISHEK TRIPATHI

          2,0611728




          2,0611728












          • Perfectly working. Thanks!

            – Magento vsmarttec
            14 hours ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            14 hours ago

















          • Perfectly working. Thanks!

            – Magento vsmarttec
            14 hours ago











          • You are always welcome happy coding! ;)

            – ABHISHEK TRIPATHI
            14 hours ago
















          Perfectly working. Thanks!

          – Magento vsmarttec
          14 hours ago





          Perfectly working. Thanks!

          – Magento vsmarttec
          14 hours ago













          You are always welcome happy coding! ;)

          – ABHISHEK TRIPATHI
          14 hours ago





          You are always welcome happy coding! ;)

          – ABHISHEK TRIPATHI
          14 hours 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
            16 hours 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
            16 hours 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 16 hours ago









          Philipp SanderPhilipp Sander

          6721521




          6721521












          • Yes, I'm in the developer mode.

            – Magento vsmarttec
            16 hours ago

















          • Yes, I'm in the developer mode.

            – Magento vsmarttec
            16 hours ago
















          Yes, I'm in the developer mode.

          – Magento vsmarttec
          16 hours ago





          Yes, I'm in the developer mode.

          – Magento vsmarttec
          16 hours 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
            16 hours 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
            16 hours 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 16 hours ago

























          answered 16 hours ago









          Ronak RathodRonak Rathod

          892212




          892212












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

            – Philipp Sander
            16 hours ago

















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

            – Philipp Sander
            16 hours ago
















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

          – Philipp Sander
          16 hours ago





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

          – Philipp Sander
          16 hours 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

          Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

          Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

          Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림