I am using PHP Version 7.1.11 with Magento 2.2.4.
Using XAMPP with Windows 8.1
Each time when use setup:upgrade command my CSS get lost and do not load.
Then I have to run static-content:deploy command.
Why this is happening each time, I am working in developer mode still this issue is coming.
I also have gone through some articles in stack overflow but they are not working for me. one of the article has the same issue but still that is not working for me.
Problem setup:upgrade with CSS
Need help in understanding the exact issue.
Thanks
1 Answer 1
Please run below commands, it should fix.
Please replace user and group with your correct web user & group
Example, in ubuntu default: user = www-data & group = www-data
ie, chown -R www-data:www-data .
chown -R user:group .
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/view_preprocessed/*
rm -rf pub/static/*
rm -rf generated/*
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy en_US -f
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
chown -R user:group .
chmod u+x bin/magento
pub/static/folder and aftersetup:upgradewe must do static content deploy. Some time it is not working with developer mode.css. i am just only running commandsetup:upgradepub/staticdata but same not working for my one colleague with the same source and same configuration but he has not disabled cache from admin.pub/static/*and do you have.htaccessin pub and static folder.