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?

7 REPLIES 7

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. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: pub/media/styles.css Not Found

Thank you very much!! Work like a charm.

Re: pub/media/styles.css Not Found

The link to styles.css appears broken.

Re: pub/media/styles.css Not Found

I have a similar problem, In my case file exists in the directory but the media path is not rendering on the frontend. Any suggestion would be appreciated.

 

Example `%7B%7BMEDIA_URL%7D%7Dstyles.css`

Re: pub/media/styles.css Not Found

Howdy,

There can be two purposes behind getting this issue.

Initially it very well might be that send was not fruitful. For this first, go to your Magento organizer and check for the styles.css record in the bar/media envelope. In the event that this record was available, give the bar envelope the required rwx consent.

Also, assuming the document was absent, run the convey order effectively.

Expectation this was useful.