0

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
asked May 8, 2018 at 10:16
7
  • 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. Commented May 8, 2018 at 10:32
  • Then where I have to change CSS? Can you favor me? Commented May 8, 2018 at 10:37
  • But, Where should find theme css? I have unable to find another css in theme folder. Commented May 8, 2018 at 10:43
  • I have genius theme Commented 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. Commented May 8, 2018 at 11:48

2 Answers 2

0

Please follow following steps:

  1. Delete everything under static folder except .htaccess file(Do take backup before delete).
  2. Run: chmod 777 -R pub
  3. Run : php bin/magento setup:static-content:deploy
  4. Run : php bin/magento cache: flush
  5. Clear browser's cache and reload the page.
answered May 8, 2018 at 10:46
5
  • But where should I change theme CSS? I modified in pub\static\frontend\genius\genius3\en_US\css\style.css. Commented 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. Commented 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. Commented 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. Commented 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.css Commented May 8, 2018 at 11:29
0

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 
answered May 8, 2018 at 12:52
1
  • I have followed your instructions. But not done. Its auto update old file in pub/static folder. Commented May 9, 2018 at 5:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.