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.

  • 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 May 8 '18 at 10:32
  • Then where I have to change CSS? Can you favor me? – hridu May 8 '18 at 10:37
  • But, Where should find theme css? I have unable to find another css in theme folder. – hridu May 8 '18 at 10:43
  • I have genius theme – hridu May 8 '18 at 10:46
  • I have changed in app/design/frontend/genius/genius3/css/style.css. is it right path to change CSS. – hridu May 8 '18 at 11:48

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.
  • But where should I change theme CSS? I modified in pub\static\frontend\genius\genius3\en_US\css\style.css. – hridu May 8 '18 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 May 8 '18 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 May 8 '18 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 May 8 '18 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 – hridu May 8 '18 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 May 9 '18 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.