Wordpress styles not loading

I have a WordPress website and the first page of it not load properly and messed up. I examined the browser console and it show me some errors as below:

Refused to apply style from ‘’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled

I never modified any file or…Why did this happen and how can I solve it?

Can it because of below Apache configuration:

LoadModule deflate_module modules/mod_deflate.so

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
  Header set Cache-Control "max-age=63072000, public"

Thank you.

Did it actually say <URL> in the error message or are you just hiding the URL for some reason?

Is the URL pointing to a file path that actually exists? I am guessing not since the rest of the errors being 404 as well.

I don’t think the apache configuration you show there is messing with it, but if for some reason apache is seeing CSS files as being of mime type text/html, that would be a problem. Do you have the URL you can show us so we can take a look ourselves?

1 Like

Thank you so much.
Can I send the website name by PM or email to you?

1 Like

Can you not just post the link?

Shouldn’t it be text/css?


No idea. How can I sure?

Yes it should be text/css and I am not sure if this is a local apache setup you have or not, but if you have access to Apache, there will be a mime.types file in the apache config folder. You should see something like…

AddType text/css .css 
AddHandler text/css .css 

This is telling apache that when it receives a request for a file ending in .css, it needs to be handled as a text/css content type. It may be that this definition is missing or not setup and so apache is guessing at the file being a text/html file and so the browser is confused.

Until we can see the site in question and dig into the site with dev tools, we can’t see if this is actually the case or not.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.