cancel
Showing results for 
Search instead for 
Did you mean: 

pub/media/styles.css Not Found

pub/media/styles.css Not Found

I tried every way(regenerate code, clean cache) I could find but still can't resolve this issue.

 

I did a fresh installation, and everything works fine, except only pub/media/styles.css 404 Not Found, all other js and css are good when loading homepage.

 

any idea?

3 REPLIES

Re: pub/media/styles.css Not Found

Hi,

 

There can be two reasons for getting this issue.

 

Firstly it may be that deploy was not successful. For this first, go to your Magento folder and check for the styles.css file in the pub/media folder. If this file was present then give the pub folder the required rwx permission.

Secondly, if the file was not present then run the deploy command correctly.

Hope this was helpful.


Re: pub/media/styles.css Not Found


MuditShukla wrote:

Hi,

 

There can be two reasons for getting this issue.

 

Firstly it may be that deploy was not successful. For this first, go to your Magento folder and check for the styles.css file in the pub/media folder. If this file was present then give the pub folder the required rwx permission.

Secondly, if the file was not present then run the deploy command correctly.

Hope this was helpful.



Thank you for your reply. Just checked and that file don't exist. I tried to deploy again and again, but only this file missing. Don't know whats happening...

Re: pub/media/styles.css Not Found

@st00,

If your magento 2 with path pub/media doesn't contains styles.css file then you have to keep first styles.css file.

 

Below styles is for styles.css file, Keep Below styles in your pub/media/styles.css file,

 you can get file from demo site of magento 2 by Nexcess,

Styles.css

 

Now run command, 

 

php bin/magento setup:upgrade

After upgrade completes,

 

Run deploy command,

 

php bin/magento setup:static-content:deploy

Clear cache and reload page.

 


If response was helpful to you,Consider giving kudos to the post.
If issue solved, click Accept as Solution.

 

If Issue Solved, Click Kudos/Accept As solutions.