when ever i change single line of css should i have to deploy static content all time












1















I was working with magento 2 and trying to change some css whenever i change single line of css forexample i was trying to change the _module.less file in Magento_Theme/web/css/source
whenever i change sinle line of it didnt show any change but when i remove content from pub/static folder and var/cache and var/view_preprocessed then i am able to see the change what could be the better solution for it to save time ?
I am in a developer mode .










share|improve this question



























    1















    I was working with magento 2 and trying to change some css whenever i change single line of css forexample i was trying to change the _module.less file in Magento_Theme/web/css/source
    whenever i change sinle line of it didnt show any change but when i remove content from pub/static folder and var/cache and var/view_preprocessed then i am able to see the change what could be the better solution for it to save time ?
    I am in a developer mode .










    share|improve this question

























      1












      1








      1








      I was working with magento 2 and trying to change some css whenever i change single line of css forexample i was trying to change the _module.less file in Magento_Theme/web/css/source
      whenever i change sinle line of it didnt show any change but when i remove content from pub/static folder and var/cache and var/view_preprocessed then i am able to see the change what could be the better solution for it to save time ?
      I am in a developer mode .










      share|improve this question














      I was working with magento 2 and trying to change some css whenever i change single line of css forexample i was trying to change the _module.less file in Magento_Theme/web/css/source
      whenever i change sinle line of it didnt show any change but when i remove content from pub/static folder and var/cache and var/view_preprocessed then i am able to see the change what could be the better solution for it to save time ?
      I am in a developer mode .







      magento2






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 4 hours ago









      Magento BugMagento Bug

      1698




      1698






















          4 Answers
          4






          active

          oldest

          votes


















          0














          If you are in developer mode, you should be able to just refresh the page. Personally, I use grunt and livereload. However, if you are not using those, I find it helpful to do the following when I first start:




          1. rm -rf pub/static/frontend

          2. rm -rf var/cache

          3. rm -rf var/page_cache

          4. rm -rf var/view_preprocessed

          5. php bin/magento cache:disable full_page block_html

          6. php bin/magento cache:clean

          7. php bin/magento setup:static-content:deploy --area=frontend (this isn't truly necessary but I always do this when I begin the task and NOT on each change)


          Also, if you still don't see the changes, flush your browser cache.






          share|improve this answer


























          • I am in a developer mode i am unable to see changes when i refresh the page ... to see the change i have to do the steps you have mentioned again and again .

            – Magento Bug
            3 hours ago











          • I just updated my answer. Try to follow it exactly, step by step and see what happens

            – Shawn Abramson
            3 hours ago











          • no you dont understand my question when i remove the folders you have mentioned and deploy static content i see the changes but for every change i have to do this , i dont want to to do this .... i have tried your answer

            – Magento Bug
            3 hours ago



















          0














          If your are editing less files you need to follow the steps mentioned on other answers. Or configure grunt task runners to compile the less once a file is changed.



          https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css_debug.html






          share|improve this answer































            0














            Always Use developer mode when you are making changes to website.



            For me, after making CSS/JS changes, i need to clear magento cache by running




            php bin/magento cache:clean




            and then clear Browser cache (Ctrl+Shift+Delete and Clear cache)






            share|improve this answer































              0














              If you are changing in less file and want reflection of your changes withour removing static content, you should use client side compilation instead of server side compilation. Check this for more information:https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html






              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%2f262140%2fwhen-ever-i-change-single-line-of-css-should-i-have-to-deploy-static-content-all%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                0














                If you are in developer mode, you should be able to just refresh the page. Personally, I use grunt and livereload. However, if you are not using those, I find it helpful to do the following when I first start:




                1. rm -rf pub/static/frontend

                2. rm -rf var/cache

                3. rm -rf var/page_cache

                4. rm -rf var/view_preprocessed

                5. php bin/magento cache:disable full_page block_html

                6. php bin/magento cache:clean

                7. php bin/magento setup:static-content:deploy --area=frontend (this isn't truly necessary but I always do this when I begin the task and NOT on each change)


                Also, if you still don't see the changes, flush your browser cache.






                share|improve this answer


























                • I am in a developer mode i am unable to see changes when i refresh the page ... to see the change i have to do the steps you have mentioned again and again .

                  – Magento Bug
                  3 hours ago











                • I just updated my answer. Try to follow it exactly, step by step and see what happens

                  – Shawn Abramson
                  3 hours ago











                • no you dont understand my question when i remove the folders you have mentioned and deploy static content i see the changes but for every change i have to do this , i dont want to to do this .... i have tried your answer

                  – Magento Bug
                  3 hours ago
















                0














                If you are in developer mode, you should be able to just refresh the page. Personally, I use grunt and livereload. However, if you are not using those, I find it helpful to do the following when I first start:




                1. rm -rf pub/static/frontend

                2. rm -rf var/cache

                3. rm -rf var/page_cache

                4. rm -rf var/view_preprocessed

                5. php bin/magento cache:disable full_page block_html

                6. php bin/magento cache:clean

                7. php bin/magento setup:static-content:deploy --area=frontend (this isn't truly necessary but I always do this when I begin the task and NOT on each change)


                Also, if you still don't see the changes, flush your browser cache.






                share|improve this answer


























                • I am in a developer mode i am unable to see changes when i refresh the page ... to see the change i have to do the steps you have mentioned again and again .

                  – Magento Bug
                  3 hours ago











                • I just updated my answer. Try to follow it exactly, step by step and see what happens

                  – Shawn Abramson
                  3 hours ago











                • no you dont understand my question when i remove the folders you have mentioned and deploy static content i see the changes but for every change i have to do this , i dont want to to do this .... i have tried your answer

                  – Magento Bug
                  3 hours ago














                0












                0








                0







                If you are in developer mode, you should be able to just refresh the page. Personally, I use grunt and livereload. However, if you are not using those, I find it helpful to do the following when I first start:




                1. rm -rf pub/static/frontend

                2. rm -rf var/cache

                3. rm -rf var/page_cache

                4. rm -rf var/view_preprocessed

                5. php bin/magento cache:disable full_page block_html

                6. php bin/magento cache:clean

                7. php bin/magento setup:static-content:deploy --area=frontend (this isn't truly necessary but I always do this when I begin the task and NOT on each change)


                Also, if you still don't see the changes, flush your browser cache.






                share|improve this answer















                If you are in developer mode, you should be able to just refresh the page. Personally, I use grunt and livereload. However, if you are not using those, I find it helpful to do the following when I first start:




                1. rm -rf pub/static/frontend

                2. rm -rf var/cache

                3. rm -rf var/page_cache

                4. rm -rf var/view_preprocessed

                5. php bin/magento cache:disable full_page block_html

                6. php bin/magento cache:clean

                7. php bin/magento setup:static-content:deploy --area=frontend (this isn't truly necessary but I always do this when I begin the task and NOT on each change)


                Also, if you still don't see the changes, flush your browser cache.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 3 hours ago

























                answered 3 hours ago









                Shawn AbramsonShawn Abramson

                2,4771915




                2,4771915













                • I am in a developer mode i am unable to see changes when i refresh the page ... to see the change i have to do the steps you have mentioned again and again .

                  – Magento Bug
                  3 hours ago











                • I just updated my answer. Try to follow it exactly, step by step and see what happens

                  – Shawn Abramson
                  3 hours ago











                • no you dont understand my question when i remove the folders you have mentioned and deploy static content i see the changes but for every change i have to do this , i dont want to to do this .... i have tried your answer

                  – Magento Bug
                  3 hours ago



















                • I am in a developer mode i am unable to see changes when i refresh the page ... to see the change i have to do the steps you have mentioned again and again .

                  – Magento Bug
                  3 hours ago











                • I just updated my answer. Try to follow it exactly, step by step and see what happens

                  – Shawn Abramson
                  3 hours ago











                • no you dont understand my question when i remove the folders you have mentioned and deploy static content i see the changes but for every change i have to do this , i dont want to to do this .... i have tried your answer

                  – Magento Bug
                  3 hours ago

















                I am in a developer mode i am unable to see changes when i refresh the page ... to see the change i have to do the steps you have mentioned again and again .

                – Magento Bug
                3 hours ago





                I am in a developer mode i am unable to see changes when i refresh the page ... to see the change i have to do the steps you have mentioned again and again .

                – Magento Bug
                3 hours ago













                I just updated my answer. Try to follow it exactly, step by step and see what happens

                – Shawn Abramson
                3 hours ago





                I just updated my answer. Try to follow it exactly, step by step and see what happens

                – Shawn Abramson
                3 hours ago













                no you dont understand my question when i remove the folders you have mentioned and deploy static content i see the changes but for every change i have to do this , i dont want to to do this .... i have tried your answer

                – Magento Bug
                3 hours ago





                no you dont understand my question when i remove the folders you have mentioned and deploy static content i see the changes but for every change i have to do this , i dont want to to do this .... i have tried your answer

                – Magento Bug
                3 hours ago













                0














                If your are editing less files you need to follow the steps mentioned on other answers. Or configure grunt task runners to compile the less once a file is changed.



                https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css_debug.html






                share|improve this answer




























                  0














                  If your are editing less files you need to follow the steps mentioned on other answers. Or configure grunt task runners to compile the less once a file is changed.



                  https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css_debug.html






                  share|improve this answer


























                    0












                    0








                    0







                    If your are editing less files you need to follow the steps mentioned on other answers. Or configure grunt task runners to compile the less once a file is changed.



                    https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css_debug.html






                    share|improve this answer













                    If your are editing less files you need to follow the steps mentioned on other answers. Or configure grunt task runners to compile the less once a file is changed.



                    https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css_debug.html







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 2 hours ago









                    gabehougabehou

                    18511




                    18511























                        0














                        Always Use developer mode when you are making changes to website.



                        For me, after making CSS/JS changes, i need to clear magento cache by running




                        php bin/magento cache:clean




                        and then clear Browser cache (Ctrl+Shift+Delete and Clear cache)






                        share|improve this answer




























                          0














                          Always Use developer mode when you are making changes to website.



                          For me, after making CSS/JS changes, i need to clear magento cache by running




                          php bin/magento cache:clean




                          and then clear Browser cache (Ctrl+Shift+Delete and Clear cache)






                          share|improve this answer


























                            0












                            0








                            0







                            Always Use developer mode when you are making changes to website.



                            For me, after making CSS/JS changes, i need to clear magento cache by running




                            php bin/magento cache:clean




                            and then clear Browser cache (Ctrl+Shift+Delete and Clear cache)






                            share|improve this answer













                            Always Use developer mode when you are making changes to website.



                            For me, after making CSS/JS changes, i need to clear magento cache by running




                            php bin/magento cache:clean




                            and then clear Browser cache (Ctrl+Shift+Delete and Clear cache)







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 1 hour ago









                            KhushbuKhushbu

                            377




                            377























                                0














                                If you are changing in less file and want reflection of your changes withour removing static content, you should use client side compilation instead of server side compilation. Check this for more information:https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html






                                share|improve this answer




























                                  0














                                  If you are changing in less file and want reflection of your changes withour removing static content, you should use client side compilation instead of server side compilation. Check this for more information:https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    If you are changing in less file and want reflection of your changes withour removing static content, you should use client side compilation instead of server side compilation. Check this for more information:https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html






                                    share|improve this answer













                                    If you are changing in less file and want reflection of your changes withour removing static content, you should use client side compilation instead of server side compilation. Check this for more information:https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-preprocess.html







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered 48 mins ago









                                    Satish DubariyaSatish Dubariya

                                    17412




                                    17412






























                                        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%2f262140%2fwhen-ever-i-change-single-line-of-css-should-i-have-to-deploy-static-content-all%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

                                        Polycentropodidae

                                        Magento 2 Error message: Invalid state change requested

                                        Paulmy