I want to customize theme CSS which are in pub/static folder.
I have run all command like
- php bin/Magento setup:static-content: deploy
- Cache:clean
- cache:flush
but not reflected changes. It loads automatically old CSS.
Nikunj Vadariya
4,0371 gold badge21 silver badges30 bronze badges
-
Becuase, the style.css file in this pub folder.I tried to put(pub folder) in app/design/frontend/theme/theme. but not reflected changes.hridu– hridu2018年05月08日 10:32:10 +00:00Commented May 8, 2018 at 10:32
-
Then where I have to change CSS? Can you favor me?hridu– hridu2018年05月08日 10:37:01 +00:00Commented May 8, 2018 at 10:37
-
But, Where should find theme css? I have unable to find another css in theme folder.hridu– hridu2018年05月08日 10:43:39 +00:00Commented May 8, 2018 at 10:43
-
I have genius themehridu– hridu2018年05月08日 10:46:04 +00:00Commented May 8, 2018 at 10:46
-
I have changed in app/design/frontend/genius/genius3/css/style.css. is it right path to change CSS.hridu– hridu2018年05月08日 11:48:45 +00:00Commented May 8, 2018 at 11:48
2 Answers 2
Please follow following steps:
- Delete everything under static folder except .htaccess file(Do take backup before delete).
- Run: chmod 777 -R pub
- Run : php bin/magento setup:static-content:deploy
- Run : php bin/magento cache: flush
- Clear browser's cache and reload the page.
-
But where should I change theme CSS? I modified in pub\static\frontend\genius\genius3\en_US\css\style.css.hridu– hridu2018年05月08日 10:49:56 +00:00Commented May 8, 2018 at 10:49
-
Please confirm from page source that the same css file is getting loaded. If the file is same then what content it loads.mighty_hk– mighty_hk2018年05月08日 10:56:37 +00:00Commented May 8, 2018 at 10:56
-
I modified in pub\static\frontend\genius\genius3\en_US\css\style.css.But its load older css automatically after run content deploy command. But I inspect file location its goes to this pub folder.hridu– hridu2018年05月08日 10:58:48 +00:00Commented May 8, 2018 at 10:58
-
Change what you want to change in file : app/design/frontend/genius/genius3/css/style.css and then follow the steps i mentioned above.mighty_hk– mighty_hk2018年05月08日 11:07:42 +00:00Commented May 8, 2018 at 11:07
-
I have followed your instructions but not changes. Regenerates CSS file in Pub/Static folder automatically and load old CSS(default css)I have changed in app/design/frontend/genius/genius3/css/style.csshridu– hridu2018年05月08日 11:29:27 +00:00Commented May 8, 2018 at 11:29
Please following Below steps:
rm -rf generated/* var/log/* var/report/* var/session/* var/view_preprocessed/* pub/static/frontend/* var/di/* &&
php bin/magento setup:upgrade &&
php bin/magento cache:clean &&
php bin/magento cache:flush &&
php bin/magento setup:static-content:deploy -f
-
I have followed your instructions. But not done. Its auto update old file in pub/static folder.hridu– hridu2018年05月09日 05:40:22 +00:00Commented May 9, 2018 at 5:40
default