0

After installing Magento 2 CE (version 2.17) fresh version. I found following 404 error of the path on following directory pub/media/styles.css. I found some solution over the internet and I tried that, but no one is work for me. Then on the admin panel, Content->Design->Configuration and on the HTML Head section's "Scripts and Style Sheets" field I found following code

<link  rel="stylesheet" type="text/css"  media="all" href="{{MEDIA_URL}}styles.css" />

But on the following directory, no file exists.

Please help me to get rid of this problem.

2 Answers 2

0

Try this,

Remove all files with in static folder, not .htaccess, /pub/static/* file. and remove all file with in var/*

Then run,

 <mage-root>  rm -rf var/*
 <mage-root>php bin/magento setup:static-content:deploy
 <mage-root>php bin/magento cache:clean

Clear cache, Then check it.

1
  • Thanks @Rajkumar for the reply. But not works for me. the problem is on directory pub/media/ not pub/static. Commented Aug 8, 2017 at 11:50
0

Actually, there is some issue with Magento version or permission, I used this file to load the layout.

https://equaltrue.com/resource/magento/magento2/pub/media/styles.css

Upload the file on root to pub/media

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.