1

I have a fresh new intall of magento 2, which appeared to be working fine till I changed the Theme to Luma. Then the frontend styles disapeared, the info is there, as well as the products, but no styles at all, not even if chose blank theme or no theme at all. Backend is OK. What I have done so far:

  • Run again ./magento setup:static-content:deploy
  • Duble checked that Write Engine is ON
  • Cleared cache both in Magento admin and using command line
  • Reindexed via command line
  • Cleared browser cache
  • Set directories and files permisions to 755 and 644 respectively
  • Veryfied the exitence of .htaccess file in the pub/stactic directory
  • tried to recompile styles only

But just cannot get the styles to come back again.

2

Remove folders from Var directory (cache, generation and page_cache) then use following commands in CLI(from magento 2 root): - php bin/magento setup:di:compile - php bin/magento setup:static-content:deploy

then refresh page and you will have all css applied.

0

I had the same problem. The following trick did it. 1)Open Terminal. 2)cd to your root(your project folder) directory. 3)Remove the contents of the following folders as super user. 1) root/var/view_preprocessed/ 2) root/pub/static/

$ sudo rm -rf *(hit return)

When you were 'cd'-ed in both the locations. Don't worry about deleting the files. They are repopulated again with the newly active theme contents.

Now reload your store and view. Your problem should be solved by now.

P.S -> Only use the above command while you are in one of the above mentioned directories. Or-else you will inadvertently delete the contents of the folder you are in, '*' means everything. This is for the uninitiated.

  • 1
    Just a note, since not everyone here knows what they are doing, posting commands like sudo rm -rf * can be very dangerous. People not understanding what they are doing can do a lot of damage. It's better to post something like sudo rm -rf var/view_preprocessed/* so if someone where to copy and paste it not knowing what they are doing, it will just do nothing to their site. – circlesix Feb 25 '17 at 23:08
0

You have to do the below steps again:

  1. Remove blank and luma folder from magento2/pub/static/frontend/Magento/
  2. After Remove you have to apply command php bin/magento setup:static-content:deploy

Clear cache of admin and clear browser cache plus remove var folder from the root.

Check again It's working.

  • I had already done that, and did not help ... – baryte Mar 21 '16 at 23:14

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.