I installed a very simple hello world module which works.

php bin/magento module:enable black_test

php bin/magento setup:upgrade

However, now my site looks destroyed. The module is working fine, it is just a controller, so the module did not destroyed my site.

enter image description here

How can I fix this?

  • did you deploy the static content?
    – ASQ
    Sep 17, 2019 at 9:47
  • @ASQ, I only did what you can see in my post.
    – Black
    Sep 17, 2019 at 9:48
  • Check if there is any wrong css or less fine in module, otherwise run command: php bin/magento setup:static-content:deploy -f
    – temper
    Sep 17, 2019 at 10:00

2 Answers 2


You need to deploy the static after you run this command

php bin/magento setup:upgrade

by running this command

for Magento version 2.2 and above

php -dmemory_limit=-1 bin/magento setup:static-content:deploy -f


php -dmemory_limit=-1 bin/magento s:s:d -f

for Magento version 2.1 and below

php -dmemory_limit=-1 bin/magento setup:static-content:deploy


php -dmemory_limit=-1 bin/magento s:s:d

After that flush your cache

php bin/magento c:f

You need to run the below deployment commands as well after php bin/magento setup:upgrade

php bin/magento s:s:d -f
php bin/magento c:f

Also, please check if your pub directory has .htaccess file as well.

Hope it helps!!!

  • What is this doing? Looks cryptic. Is c:f short for -> cache:flush?
    – Black
    Sep 17, 2019 at 9:49
  • You need to re-generate the files after running the setup:upgrade command with the above-mentiond commands.
    – Sumit
    Sep 17, 2019 at 9:54

Your Answer

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

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