I've added a module to my website and ran those commands

php bin\magento setup:upgrade
php bin\magento setup:di:compile
php bin\magento setup:static-cotent:deploy
php bin\magento cache:flush

since then admin panel sidebar doesn't respond and when I've tried to log in to admin panel from another browser it has no style

how to solve this problem


Run this:

rm -rf var/view_preprocessed/* && rm -rf pub/static/* && php bin/magento c:f && php bin/magento setup:static-content:deploy --theme Magento/backend -f


In my experience, when admin has no style loaded is either Cloudflare (or similar) service issue, or you need to delete the static contents manually.

  1. Flush Cloudflare (or similar) cache and see if it resolves the issue
  2. Depending on the M2 version:

version < 2.2.x

rm -rf var/generation/* 
rm -rf var/view_preprocessed/* 
rm -rf pub/static/*

version >= 2.2.x

rm -rf generated/* 
rm -rf var/view_preprocessed/* 
rm -rf pub/static/*

re-run the Magento deploy commands:

php bin/magento setup:upgrade  
php bin/magento setup:di:compile  
php bin/magento setup:static-cotent:deploy

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.