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
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
add a comment |
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
add a comment |
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
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
setup-di-compile command
edited 14 hours ago
ABHISHEK TRIPATHI
2,0611728
2,0611728
asked 16 hours ago
Magento vsmarttecMagento vsmarttec
31619
31619
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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?
Perfectly working. Thanks!
– Magento vsmarttec
14 hours ago
You are always welcome happy coding! ;)
– ABHISHEK TRIPATHI
14 hours ago
add a comment |
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.
Yes, I'm in the developer mode.
– Magento vsmarttec
16 hours ago
add a comment |
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
eitherdi.xmlorclass,factory methodetc 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
that's just wrong... you do NOT need to run it everytime
– Philipp Sander
16 hours ago
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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?
Perfectly working. Thanks!
– Magento vsmarttec
14 hours ago
You are always welcome happy coding! ;)
– ABHISHEK TRIPATHI
14 hours ago
add a comment |
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?
Perfectly working. Thanks!
– Magento vsmarttec
14 hours ago
You are always welcome happy coding! ;)
– ABHISHEK TRIPATHI
14 hours ago
add a comment |
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?
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?
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
add a comment |
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
add a comment |
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.
Yes, I'm in the developer mode.
– Magento vsmarttec
16 hours ago
add a comment |
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.
Yes, I'm in the developer mode.
– Magento vsmarttec
16 hours ago
add a comment |
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.
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.
answered 16 hours ago
Philipp SanderPhilipp Sander
6721521
6721521
Yes, I'm in the developer mode.
– Magento vsmarttec
16 hours ago
add a comment |
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
add a comment |
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
eitherdi.xmlorclass,factory methodetc 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
that's just wrong... you do NOT need to run it everytime
– Philipp Sander
16 hours ago
add a comment |
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
eitherdi.xmlorclass,factory methodetc 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
that's just wrong... you do NOT need to run it everytime
– Philipp Sander
16 hours ago
add a comment |
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
eitherdi.xmlorclass,factory methodetc 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
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
eitherdi.xmlorclass,factory methodetc 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
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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