Showing results for 
Search instead for 
Did you mean: 

Styles Messed Up After Fresh Install

Styles Messed Up After Fresh Install

After installing CE 2.0, this is what my front-end and admin panel looks like.  Sometimes when I refresh the page, the styles disappear altogether and only displays plain text.  Has anyone ever had this problem before?




I've reinstalled Magento three times, that didn't work.  I set my file permissions in accordance with Magento's recommendations and it broke the site (403 error).  So I set my permissions back to 755 for directories and 644 for files.  And that's where I'm at now.  Any help would be greatly appreciated.


Re: Styles Messed Up After Fresh Install



When not in production mode Magento 2 will try to create symlinks for some static resources:

Open app/etc/di.xml and find the virtualType name="developerMaterialization" section. You change Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

Delete the files under pub/static. Please don't delete the .htaccess file.


You can read more here:

Problem solved? Click Accept as Solution!

Re: Styles Messed Up After Fresh Install

When I look at di.xml, mine looks a bit different.  This is what I see:

<virtualType name="developerMaterialization" type="Magento\Framework\App\View\Asset\MaterializationStrategy\Factory">


I tried changing it to ...\MaterializationStrategy\Copy">, but it didn't really change anything.

Also, everything under pub/static looks important and I'm hesitant to delete anything there.  I have three directories named "_requirejs, adminhtml, and frontend".  Then, of course there is the htaccess file. 

Re: Styles Messed Up After Fresh Install

I have no problems when installing version 1.9.

I'm running a Linux server with Apache 2.4, PHP 5.5, and MariaDB 10

Re: Styles Messed Up After Fresh Install

I hate Magento so much.  I gave it a fair chance, but I'm done with it. 

Re: Styles Messed Up After Fresh Install

Oof. Sorry to hear that @sgrd267, I haven't seen this happen before so it's likely environment related. CE1.9 is quite different from 2.0 so requirements are also different. Let me know if you'd still like some help sorting it out.


You can start with trying the following two things:


  • Look at the network tab in your browser's debugger to see if there are any CSS or JS files not loading.
  • Look at the console for js errors.
  • From the command line, run bin/magento setup:static-content:deploy to see if that works without errors.

Developer Relations, Adobe Experience Cloud
Problem solved? Click Accept as Solution!
Still stuck? Check out our documentation:

Re: Styles Messed Up After Fresh Install


I have faced the same problem, resolve by the following command:


Execcute the commans as in given sequence
1: rm -rf var/di/* var/generation/* var/cache/* var/page_cache/* var/view_preprocessed/* var/composer_home/cache/*
2: sudo chmod 777 var -R
3: sudo chmod 777 pub -R
4: sudo php bin/magento setup:static-content:deploy
5: Repeat step 2 & 3.


Hope this will also help you.