0

I have a Magento 2.2.5 based website and when I do a below command:

php bin/magento setup:di:compile
and then
php bin/magento setup:static-content:deploy

And then I look in the

pub/static/frontend/Smartwave/porto_child/en_US/css

And the same CSS file that is in

app/design/frontend/Smartwave/porto_child/web/css

Is not copied over to the pub static folder? I checked and the Magento mode is production. Also I made sure the pub static is writable. I also tried renaming the static folder to 'static---' and then recompiled and redeployed and again the CSS file for some reason was not there in pub static?

  • Did you not deleted .htaccess in pub/static/.htaccess? – Evgeniy Kapelko Dec 14 '18 at 7:45
0

Download .htaccess from official Magento 2 repository

Run below command.

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

Never delete .htaccess file from pub/static

0

Try below command step by step and check again.

Step 1) rm -rf var/* pub/static/*

Step 2) php bin/magento setup:upgrade

Step 3) php bin/magento setup:static-content:deploy -f

Step 4) php bin/magento cache:flush

Hope it help!

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.