magento2 - how do I show css updates in production mode?
I've spent a few days reading complex questions and answers on this topic. I'm looking for clear instructions regarding how to make simple edits like changes to css in my magento2 site. Is it possible to do so in production mode?
At the moment, I'm unable to see changes to the css in BOTH development and production mode. I've tried editing both the style.css file in my theme, and the .less file in the theme web/css/source folder.
Running commands like
php bin/magento setup:static-content:deploy
isn't doing anything.
magento2 css
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I've spent a few days reading complex questions and answers on this topic. I'm looking for clear instructions regarding how to make simple edits like changes to css in my magento2 site. Is it possible to do so in production mode?
At the moment, I'm unable to see changes to the css in BOTH development and production mode. I've tried editing both the style.css file in my theme, and the .less file in the theme web/css/source folder.
Running commands like
php bin/magento setup:static-content:deploy
isn't doing anything.
magento2 css
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
if you chnage css in development mode you d'ont need to redeploy onlye clear the cache magento and your navigator cache
– Mohamed El Mrabet
Nov 26 '17 at 21:00
checkout here magento.stackexchange.com/a/187029/54588
– Manoj Deswal
Nov 27 '17 at 3:48
add a comment |
I've spent a few days reading complex questions and answers on this topic. I'm looking for clear instructions regarding how to make simple edits like changes to css in my magento2 site. Is it possible to do so in production mode?
At the moment, I'm unable to see changes to the css in BOTH development and production mode. I've tried editing both the style.css file in my theme, and the .less file in the theme web/css/source folder.
Running commands like
php bin/magento setup:static-content:deploy
isn't doing anything.
magento2 css
I've spent a few days reading complex questions and answers on this topic. I'm looking for clear instructions regarding how to make simple edits like changes to css in my magento2 site. Is it possible to do so in production mode?
At the moment, I'm unable to see changes to the css in BOTH development and production mode. I've tried editing both the style.css file in my theme, and the .less file in the theme web/css/source folder.
Running commands like
php bin/magento setup:static-content:deploy
isn't doing anything.
magento2 css
magento2 css
asked Nov 26 '17 at 20:47
helefa
166
166
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
if you chnage css in development mode you d'ont need to redeploy onlye clear the cache magento and your navigator cache
– Mohamed El Mrabet
Nov 26 '17 at 21:00
checkout here magento.stackexchange.com/a/187029/54588
– Manoj Deswal
Nov 27 '17 at 3:48
add a comment |
if you chnage css in development mode you d'ont need to redeploy onlye clear the cache magento and your navigator cache
– Mohamed El Mrabet
Nov 26 '17 at 21:00
checkout here magento.stackexchange.com/a/187029/54588
– Manoj Deswal
Nov 27 '17 at 3:48
if you chnage css in development mode you d'ont need to redeploy onlye clear the cache magento and your navigator cache
– Mohamed El Mrabet
Nov 26 '17 at 21:00
if you chnage css in development mode you d'ont need to redeploy onlye clear the cache magento and your navigator cache
– Mohamed El Mrabet
Nov 26 '17 at 21:00
checkout here magento.stackexchange.com/a/187029/54588
– Manoj Deswal
Nov 27 '17 at 3:48
checkout here magento.stackexchange.com/a/187029/54588
– Manoj Deswal
Nov 27 '17 at 3:48
add a comment |
5 Answers
5
active
oldest
votes
Make sure you are editing the correct css/less files that are located in app/design/frontend/{vendor}/{theme}/web/css
and not the ones in pub/static
.
After you make changes, first flush the static files cache and refresh the page cache in Magento admin.
This works in developer mode.
is there a command to flush static file cache in production mode or do I have to manually delete the files?
– helefa
Nov 26 '17 at 21:13
@helefa I suggest doing it from admin (see edit)
– Lez
Nov 26 '17 at 21:17
according to this devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html, it's only available in dev mode...
– helefa
Nov 26 '17 at 21:20
@helafa You are right. In my opinon you should be in developer mode if you're still making changes to your site. But if you're in production, then userm -R pub/static/*
andrm -R var/view_preprocessed/*
from CLI
– Lez
Nov 26 '17 at 21:28
add a comment |
You can use grunt to manage Magento tasks
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/tools/using_grunt.html
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css_debug.html
Then use grunt clean
- this command will clean all statics file
add a comment |
maybe its the client side. Your browser may cached the static files
if you are using browser like chrome, right click, select inspect, select network, and tick checkbox disable cache
hit refresh F5 without closing the inspect
add a comment |
I recently had an issue exactly the same. I suggest you try what worked for me and Clear var/view_preprocessed
directory and then redeploy using the below commands
php bin/magento setup:static-content:deploy --language en_GB
php bin/magento cache:clean
php bin/magento cache:flush
add a comment |
In a production mode you can use the sequence of commands below to regenerate the css files. Specially if you're using less files.
It's not required in developer and default modes.
rm var/view_preprocessed/* pub/static/frontend/*
&& php bin/magento setup:static-content:deploy en_AU en_US
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%2f203259%2fmagento2-how-do-i-show-css-updates-in-production-mode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
Make sure you are editing the correct css/less files that are located in app/design/frontend/{vendor}/{theme}/web/css
and not the ones in pub/static
.
After you make changes, first flush the static files cache and refresh the page cache in Magento admin.
This works in developer mode.
is there a command to flush static file cache in production mode or do I have to manually delete the files?
– helefa
Nov 26 '17 at 21:13
@helefa I suggest doing it from admin (see edit)
– Lez
Nov 26 '17 at 21:17
according to this devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html, it's only available in dev mode...
– helefa
Nov 26 '17 at 21:20
@helafa You are right. In my opinon you should be in developer mode if you're still making changes to your site. But if you're in production, then userm -R pub/static/*
andrm -R var/view_preprocessed/*
from CLI
– Lez
Nov 26 '17 at 21:28
add a comment |
Make sure you are editing the correct css/less files that are located in app/design/frontend/{vendor}/{theme}/web/css
and not the ones in pub/static
.
After you make changes, first flush the static files cache and refresh the page cache in Magento admin.
This works in developer mode.
is there a command to flush static file cache in production mode or do I have to manually delete the files?
– helefa
Nov 26 '17 at 21:13
@helefa I suggest doing it from admin (see edit)
– Lez
Nov 26 '17 at 21:17
according to this devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html, it's only available in dev mode...
– helefa
Nov 26 '17 at 21:20
@helafa You are right. In my opinon you should be in developer mode if you're still making changes to your site. But if you're in production, then userm -R pub/static/*
andrm -R var/view_preprocessed/*
from CLI
– Lez
Nov 26 '17 at 21:28
add a comment |
Make sure you are editing the correct css/less files that are located in app/design/frontend/{vendor}/{theme}/web/css
and not the ones in pub/static
.
After you make changes, first flush the static files cache and refresh the page cache in Magento admin.
This works in developer mode.
Make sure you are editing the correct css/less files that are located in app/design/frontend/{vendor}/{theme}/web/css
and not the ones in pub/static
.
After you make changes, first flush the static files cache and refresh the page cache in Magento admin.
This works in developer mode.
edited Nov 26 '17 at 21:29
answered Nov 26 '17 at 21:09
Lez
1,220529
1,220529
is there a command to flush static file cache in production mode or do I have to manually delete the files?
– helefa
Nov 26 '17 at 21:13
@helefa I suggest doing it from admin (see edit)
– Lez
Nov 26 '17 at 21:17
according to this devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html, it's only available in dev mode...
– helefa
Nov 26 '17 at 21:20
@helafa You are right. In my opinon you should be in developer mode if you're still making changes to your site. But if you're in production, then userm -R pub/static/*
andrm -R var/view_preprocessed/*
from CLI
– Lez
Nov 26 '17 at 21:28
add a comment |
is there a command to flush static file cache in production mode or do I have to manually delete the files?
– helefa
Nov 26 '17 at 21:13
@helefa I suggest doing it from admin (see edit)
– Lez
Nov 26 '17 at 21:17
according to this devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html, it's only available in dev mode...
– helefa
Nov 26 '17 at 21:20
@helafa You are right. In my opinon you should be in developer mode if you're still making changes to your site. But if you're in production, then userm -R pub/static/*
andrm -R var/view_preprocessed/*
from CLI
– Lez
Nov 26 '17 at 21:28
is there a command to flush static file cache in production mode or do I have to manually delete the files?
– helefa
Nov 26 '17 at 21:13
is there a command to flush static file cache in production mode or do I have to manually delete the files?
– helefa
Nov 26 '17 at 21:13
@helefa I suggest doing it from admin (see edit)
– Lez
Nov 26 '17 at 21:17
@helefa I suggest doing it from admin (see edit)
– Lez
Nov 26 '17 at 21:17
according to this devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html, it's only available in dev mode...
– helefa
Nov 26 '17 at 21:20
according to this devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html, it's only available in dev mode...
– helefa
Nov 26 '17 at 21:20
@helafa You are right. In my opinon you should be in developer mode if you're still making changes to your site. But if you're in production, then use
rm -R pub/static/*
and rm -R var/view_preprocessed/*
from CLI– Lez
Nov 26 '17 at 21:28
@helafa You are right. In my opinon you should be in developer mode if you're still making changes to your site. But if you're in production, then use
rm -R pub/static/*
and rm -R var/view_preprocessed/*
from CLI– Lez
Nov 26 '17 at 21:28
add a comment |
You can use grunt to manage Magento tasks
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/tools/using_grunt.html
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css_debug.html
Then use grunt clean
- this command will clean all statics file
add a comment |
You can use grunt to manage Magento tasks
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/tools/using_grunt.html
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css_debug.html
Then use grunt clean
- this command will clean all statics file
add a comment |
You can use grunt to manage Magento tasks
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/tools/using_grunt.html
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css_debug.html
Then use grunt clean
- this command will clean all statics file
You can use grunt to manage Magento tasks
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/tools/using_grunt.html
http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/css-topics/css_debug.html
Then use grunt clean
- this command will clean all statics file
answered Nov 27 '17 at 3:07
Typo
1113
1113
add a comment |
add a comment |
maybe its the client side. Your browser may cached the static files
if you are using browser like chrome, right click, select inspect, select network, and tick checkbox disable cache
hit refresh F5 without closing the inspect
add a comment |
maybe its the client side. Your browser may cached the static files
if you are using browser like chrome, right click, select inspect, select network, and tick checkbox disable cache
hit refresh F5 without closing the inspect
add a comment |
maybe its the client side. Your browser may cached the static files
if you are using browser like chrome, right click, select inspect, select network, and tick checkbox disable cache
hit refresh F5 without closing the inspect
maybe its the client side. Your browser may cached the static files
if you are using browser like chrome, right click, select inspect, select network, and tick checkbox disable cache
hit refresh F5 without closing the inspect
edited Nov 27 '17 at 21:57
answered Nov 27 '17 at 21:44
Afham
12616
12616
add a comment |
add a comment |
I recently had an issue exactly the same. I suggest you try what worked for me and Clear var/view_preprocessed
directory and then redeploy using the below commands
php bin/magento setup:static-content:deploy --language en_GB
php bin/magento cache:clean
php bin/magento cache:flush
add a comment |
I recently had an issue exactly the same. I suggest you try what worked for me and Clear var/view_preprocessed
directory and then redeploy using the below commands
php bin/magento setup:static-content:deploy --language en_GB
php bin/magento cache:clean
php bin/magento cache:flush
add a comment |
I recently had an issue exactly the same. I suggest you try what worked for me and Clear var/view_preprocessed
directory and then redeploy using the below commands
php bin/magento setup:static-content:deploy --language en_GB
php bin/magento cache:clean
php bin/magento cache:flush
I recently had an issue exactly the same. I suggest you try what worked for me and Clear var/view_preprocessed
directory and then redeploy using the below commands
php bin/magento setup:static-content:deploy --language en_GB
php bin/magento cache:clean
php bin/magento cache:flush
edited Nov 27 '17 at 23:44
Abhishek Panchal
3,4122829
3,4122829
answered Nov 26 '17 at 22:07
Will Lifestyle
1
1
add a comment |
add a comment |
In a production mode you can use the sequence of commands below to regenerate the css files. Specially if you're using less files.
It's not required in developer and default modes.
rm var/view_preprocessed/* pub/static/frontend/*
&& php bin/magento setup:static-content:deploy en_AU en_US
add a comment |
In a production mode you can use the sequence of commands below to regenerate the css files. Specially if you're using less files.
It's not required in developer and default modes.
rm var/view_preprocessed/* pub/static/frontend/*
&& php bin/magento setup:static-content:deploy en_AU en_US
add a comment |
In a production mode you can use the sequence of commands below to regenerate the css files. Specially if you're using less files.
It's not required in developer and default modes.
rm var/view_preprocessed/* pub/static/frontend/*
&& php bin/magento setup:static-content:deploy en_AU en_US
In a production mode you can use the sequence of commands below to regenerate the css files. Specially if you're using less files.
It's not required in developer and default modes.
rm var/view_preprocessed/* pub/static/frontend/*
&& php bin/magento setup:static-content:deploy en_AU en_US
answered Aug 2 '18 at 0:53
medina
28528
28528
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f203259%2fmagento2-how-do-i-show-css-updates-in-production-mode%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
if you chnage css in development mode you d'ont need to redeploy onlye clear the cache magento and your navigator cache
– Mohamed El Mrabet
Nov 26 '17 at 21:00
checkout here magento.stackexchange.com/a/187029/54588
– Manoj Deswal
Nov 27 '17 at 3:48