WordPress CSS Not Loading: Why the Site Looks Unstyled
An unstyled WordPress site means a stylesheet request failed or was never made. The Network tab's status column names the cause: wrong site URL, mixed content, permissions, an HTML error page, or a stale cache.
Quick fix: open DevTools, go to the Network tab, filter by CSS and reload — the status of the failing stylesheet request tells you which of five causes you have.
Before you start, know one thing that misleads most people on modern themes: a missing request is not always a missing stylesheet.
What WordPress actually sends
A WordPress page gets its CSS three ways, and only the first appears as a file request:
| How it arrives | What it looks like in the page | Examples |
|---|---|---|
| Linked file | <link rel='stylesheet' id='{handle}-css' href='…?ver=…'> |
Classic theme style.css, plugin stylesheets |
| Inlined file | <style id='{handle}-inline-css'> |
Small stylesheets registered with a file path: Twenty Twenty-Five's style.min.css, core block styles like wp-block-paragraph |
| Generated CSS | <style id='global-styles-inline-css'> |
Colours, fonts and spacing from theme.json and the Site Editor |
WordPress inlines stylesheets whose file path it knows, smallest first, until their total reaches 40,000 bytes (the styles_inline_size_limit filter). Core block styles load per block, only for blocks on the page: block themes have done this for years, and since WordPress 6.9 classic themes do too. The switches are the should_load_separate_core_block_assets and should_load_block_assets_on_demand filters. So on a block theme, two or three CSS requests in the Network tab is normal.
Read the failing request
Filter by CSS, reload, and sort by Status. Then check the Console, which names blocked requests the Network tab hides.
| Network status | Likely cause | How to confirm | Fix |
|---|---|---|---|
| 404 on every stylesheet | Wrong WordPress Address after a migration or domain change | The URL shows the old domain or a local address | Correct the site URLs |
| 404 on one file | File missing, or a combined file the cache plugin deleted | Open the URL; check the file on disk | Restore the file; purge and regenerate the cache |
| (blocked:mixed-content) | Page on https://, stylesheet on http:// |
Console shows a Mixed Content warning | Switch URLs to https:// |
| 403 | File permissions or a security rule | Open the URL directly; check server error log | 644 files, 755 directories, remove the blocking rule |
200, but Type is document or html |
Server returned an HTML page (login, error, firewall challenge) instead of CSS | Click the request: Response tab shows HTML | Fix the rule or redirect catching the URL |
| 200, old or truncated content | Stale cache or broken minified bundle | Response does not match the file on disk | Bump ver, purge every cache layer, disable CSS minify |
No request and no inline <style> |
Nothing enqueued the stylesheet | View source for the {handle}-css id |
Fix the enqueue code or the theme |
When the response is HTML, Chrome adds a Console line like Refused to apply style from '…' because its MIME type ('text/html') is not a supported stylesheet MIME type. That is a symptom, not the cause: the server sent a page instead of CSS, so fix that page.
On a WordPress 7.1.5 test install with Twenty Twenty-Five, the page source contains no stylesheet <link> for the theme at all — all three arrive as inline blocks:
<style id="wp-block-library-inline-css">…</style>
<style id="global-styles-inline-css">…</style>
<style id="twentytwentyfive-style-inline-css">…</style>
So on a block theme, an empty Network tab filtered by CSS is normal; search the page source for these ids before deciding that something failed to load.
Wrong site URLs
WordPress builds stylesheet URLs from the WordPress Address (siteurl) and Site Address (home). After a migration, if either still points at the old domain, every stylesheet request goes to a server that no longer has the files. Check Settings → General; if you cannot reach the admin, set WP_HOME and WP_SITEURL in wp-config.php as described in WP_HOME and WP_SITEURL.
That fixes asset URLs on the next request. Content, widgets and theme settings saved with the old domain need a serialisation-aware search and replace; a plain SQL REPLACE breaks serialised values. The full sequence is in migrating to a new host.
Mixed content
A page served over HTTPS will not apply a stylesheet requested over HTTP. Set both URLs to https://, replace http://yourdomain in the database, look for hard-coded http:// in the theme or Customizer CSS, and purge caches. Details in mixed content warnings.
403 and HTML responses
A 403 means the server refused the file. Typical sources are files uploaded with 600 permissions, an owner the web server cannot read, or a hardening rule that blocks /wp-includes/ or /wp-content/, where core and plugin stylesheets legitimately live. Compare your .htaccess with the default WordPress .htaccess.
Unreadable files can also hide behind the inlining described above. If WordPress cannot read a stylesheet it was going to inline, it falls back to a normal <link>, which then returns 403. With WP_DEBUG on you also get a notice beginning Unable to read the "path" key with value.
A 200 response containing HTML usually comes from a security plugin's challenge page, a login redirect on a protected directory, or a 404 page served with the wrong status. Checking HTTP headers shows the real Content-Type.
Stale caches and the version string
Every enqueued stylesheet gets ?ver= appended. Themes usually pass the theme version; with no version, WordPress uses its own version number. Edit style.css without changing that value and the URL stays the same, so the browser, the cache plugin and the CDN may all serve the old file.
For broken minification, turn off CSS minify and combine, then purge the plugin cache, the host cache and the CDN, in that order. If styling returns, re-enable features one at a time and exclude the file that breaks.
Nothing was enqueued
If there is neither a <link> nor an inline <style> for the stylesheet, nothing asked for it. In a classic theme, check that header.php still calls wp_head() and that the template did not die with a fatal error before it. A child theme must enqueue the parent's stylesheet itself; see wp_enqueue_scripts. A theme missing its header file triggers the style.css stylesheet error instead.
For block themes, generated styles come from theme.json. A JSON syntax error in that file means WordPress ignores it entirely; with WP_DEBUG on, a notice includes Error when decoding a JSON file at path and the parser's message. How the file maps to CSS is in theme.json and global styles.
Verify
- Network, filtered by CSS: no 4xx rows and no
blockedentries. - Console: no Mixed Content or MIME type messages.
- View source:
global-styles-inline-cssand your theme's handle are present, as a<link>or an inline<style>. - Check a logged-out private window, so you see what the cache and CDN serve to visitors.
Frequently asked
- Because the cause is site-wide. Admin and front end both build stylesheet URLs from the WordPress Address setting, so a wrong domain or protocol there, or a rule blocking /wp-includes/, breaks both. A theme problem leaves the admin untouched.
- WordPress adds ?ver= to every stylesheet URL, and themes usually set it to the theme version. If you edit the file without changing that version, browsers and CDNs keep serving the old copy under the same URL. Bump the version, or purge the CDN and reload with the cache disabled.
- WordPress prints small stylesheets inline when it knows their file path, up to 40 KB per page in total. Twenty Twenty-Five's style.min.css and most core block styles arrive as style tags in the page, so no request appears. Look for them in the Elements panel instead.