I have issue in cart page of my website . Currently home page and product pages are loading correctly but the cart page have issue Css and js fies in the cart page is not working

enter image description here

Please help to solve this . I have seen this question Magento 2 StyleSheet not loading

But I am not sure i can apply that solution . Please check .

I have tried sudo php bin/magento setup:static-content:deploy ,but still the cart page is same

  • Please fix your question and like add a valid screenshot of your working homepage and not working cart page, because right now your question is a mess, you telling us that your homepage is working while your provided a screenshot with broken homepage May 17, 2020 at 12:12
  • how you understand its screenshot of home page ? Home page is working fine and issue is with cart page only . May 17, 2020 at 12:25
  • Please add a screenshot from js console (there should be errors of not loading css files), need to verify if the reason is that the permission are broken or mb somebody rewritten the layout and removed the style files, there are lot of possibilities why this can happen, even exception could trigger it May 17, 2020 at 12:37

2 Answers 2


Make sure you have not deleted htaccss in pub/Static

  • Its not deleted . Only cart page have issue . Home page and product pages are working May 17, 2020 at 11:52
  • 1
    Your screenshot is showing homepage I think May 17, 2020 at 11:54
  • it is a sample screenshot only May 17, 2020 at 12:05
  • make sure the pages doesn't throw any exceptions ;) May 17, 2020 at 12:05

Run CLI Commands

sudo rm -rf var/*
sudo rm -rf pub/static/frontend/*
sudo rm -rf generated/*

sudo php bin/magento setup:upgrade
Sudo php bin/magento setup:di:compile
Sudo php bin/magento indexer:reindex
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento ca:cl
sudo php bin/magento ca:fl
  • hi friend, please tell what will happen if i run this command , i have to run only sudo rm -rf var/* ? May 17, 2020 at 11:17
  • Rm -rf delete the files and folders recursively May 17, 2020 at 11:51
  • @Devidas, please do not advice 777! please also add when setup:upgrade, compile require
    – Pawan
    May 17, 2020 at 14:57

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.