Fix My Error

Stuck? Solved.

Home › Fix Errors › WordPress › Theme CSS Not Applying
Edited style.css. Saved. Refreshed. Nothing changed.

Fix: Theme CSS Not Applying

Your custom CSS isn't showing up. It's almost always caching, specificity, or the wrong file. Here's how to know which.

Last updated: October 2026

⚡ The 30-second fix

Open DevTools (F12) and check three things:

1. Network tab — Is your CSS file loading? Look for a 200 (loaded) or 404 (missing).
2. Elements tab — Right-click the element, click "Inspect." Find the rule you wrote — is it crossed out? Something else is winning.
3. Computed tab — See what the browser is actually applying. This is the truth.

If your rule isn't even visible in DevTools, it's a caching issue. If it's visible but crossed out, it's specificity.

The 5 real causes

1

Browser cache (most common)

Your browser is holding the old CSS. This is the #1 cause — always rule it out first.

# Hard refresh (bypasses cache)
Windows/Linux: Ctrl + Shift + R
macOS:         Cmd + Shift + R

# Or open DevTools → Network → check "Disable cache"

Pro tip: Try Incognito/Private mode. If it works there, it's your browser cache.

2

Caching plugin or CDN

WordPress caches CSS at multiple layers. If you have any of these, they need purging:

  • WP Rocket, W3 Total Cache, LiteSpeed Cache, WP Super Cache — purge all caches
  • Cloudflare, BunnyCDN, Fastly — purge the CDN cache separately
  • Host-level caching (Kinsta, WP Engine) — click "Clear cache" in the host dashboard
  • CSS minification/combination plugins — disable temporarily to test
# WordPress Admin bar → Purge All Caches
# Cloudflare → Caching → Purge Everything
# Then hard refresh the page
3

CSS specificity — something else overrides it

Your CSS is loading but a more specific rule is winning. DevTools shows this clearly — your rule appears with a strikethrough.

/* ❌ Loses to a more specific selector */
.button { color: red; }

/* A theme rule with higher specificity wins: */
.theme-dark .container .button.primary {
  color: blue;
}

/* ✅ Fix: match or increase specificity */
.theme-dark .container .button.primary {
  color: red;
}

/* ✅ Or use !important (last resort) */
.button { color: red !important; }

Avoid !important. It works, but it makes future CSS changes harder. Only use it when you're overriding inline styles or vendor CSS.

4

Wrong file — you edited the parent theme

If you're using a child theme, editing the parent theme's style.css does nothing. The child theme's style.css is what loads.

wp-content/themes/
├── parent-theme/
│   └── style.css           ← ❌ Ignored if child exists
└── parent-theme-child/
    └── style.css           ← ✅ Edit this one

# Also check the child theme has this at the top:
/*
Template: parent-theme
*/

Pro tip: If you're not using a child theme, DON'T edit the parent theme's style.css — the next theme update will erase your changes. Create a child theme first.

5

Block theme (FSE) — style.css isn't used

Block themes (Twenty Twenty-Four, Twenty Twenty-Five, and many modern themes) work differently. The style.css file is often ignored in favor of theme.json and block-level styles.

# In a block theme, use one of these instead:

# 1. Site Editor → Styles → Additional CSS
#    (wp-admin → Appearance → Editor → Styles)

# 2. theme.json for global styles
{
  "version": 2,
  "styles": {
    "color": {
      "text": "#e2e8f0"
    }
  }
}

# 3. Per-block style panel in the block editor

How to check: Go to Appearance → Themes. If the theme says "Block Theme" or shows the FSE icon, this applies.

The debugging workflow (order matters)

  1. Test in Incognito. If it works, it's browser cache. Done.
  2. Purge all WordPress caches. Plugin caches, host caches, CDN caches — all of them.
  3. Check DevTools Network tab. Is your CSS file loaded (200) or missing (404)?
  4. Check DevTools Elements tab. Is your rule visible but struck through? Specificity issue.
  5. Verify the file location. Are you editing the right file? Child theme vs parent? Block theme?
  6. Disable plugins one by one. A CSS minifier or optimizer plugin might be caching the old styles.
  7. Check your CSS syntax. One missing } can break the entire file from that point down.

🛡️ How to prevent this next time

❓ Frequently asked questions

Why is my custom CSS not applying in WordPress?

The most common reasons are: browser cache, WordPress caching plugin, CSS specificity (something else overrides it), or the CSS is in the wrong file (like a parent theme's style.css). Check the browser DevTools first to see which rule is winning.

How do I test if my CSS is being loaded?

Open browser DevTools (F12), go to the Network tab, reload the page, and filter by 'CSS'. If your stylesheet isn't listed, it's not being enqueued. If it is listed, check the Elements tab to see which styles are actually applied.

Why does my CSS work in DevTools but not on the actual site?

If you can edit styles in DevTools and they work, but your changes disappear on reload, you're editing the live DOM. Your changes need to be saved into an actual CSS file, either via the Customizer, a child theme's style.css, or a code snippet plugin.

What is the difference between theme style.css and Customizer CSS?

style.css is loaded by the theme itself and can be overridden by a child theme. Customizer CSS is stored in the database and loaded last, giving it higher priority. For small tweaks, Customizer is faster. For maintainable code, use a child theme.

How do I fix CSS not applying in a block theme?

Block themes (FSE) work differently. Theme customizations go in theme.json, and block-specific styles go in the Site Editor's Additional CSS panel or per-block style panels. Editing style.css in a block theme is often ignored by the block editor's style system.

🔗 Related fixes

← All WordPress Fixes