Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Troubleshooting · Troubleshooting

How to Fix CSS Changes Not Showing in WordPress

Short answer

CSS changes often fail to show because a cache serves the old stylesheet, you edited a file the active theme does not load, or a stronger rule wins. Clear your browser, plugin and CDN cache first, then check the file and selector. If the new rule still loses, raise its specificity or bump the stylesheet version.

Key takeaways

  • A cache at the browser, plugin, host or CDN level can serve an old stylesheet after you save a CSS edit.
  • Additional CSS added in WordPress 4.7 stays tied to the active theme and stops working when you switch themes.
  • An ID selector at 1-0-0 beats any number of class selectors, so a weak selector can look like a missing edit.
  • Cloudflare Development Mode bypasses edge caching for 3 hours but does not purge files already cached.
  • The version argument in wp_enqueue_style() changes the stylesheet URL, so browsers fetch the new file.
  • A hard refresh and the browser inspector show whether the live page loads your new CSS file.

Why are my CSS changes not showing in WordPress?

Your CSS changes are not showing because a cache serves the old stylesheet, you edited a file the active theme does not load, or a stronger rule wins.

A stylesheet is a CSS file that sets colors, layout and spacing for a page. WordPress loads it from the active theme, a plugin or the Customizer.

Work through the causes in this order: cache, wrong file, then selector strength. That order saves time because cache is the most common cause.

CauseSymptomFirst fix
Browser cacheChange shows in another browserHard refresh the page
Plugin or host cacheChange shows when logged out, or after a delayPurge the cache in the plugin or host panel
CDN cacheChange shows on the direct site but not through the CDNPurge the file or use Development Mode
Wrong file editedChange never shows anywhereEdit the file the active theme loads
Weak selectorRule appears crossed out in the inspectorUse a more specific selector
Old version numberStylesheet URL still has the old versionBump the version in the enqueue call

How do I clear the cache so new CSS appears?

Clear the browser cache, then the plugin cache, then the CDN cache, and reload the page after each step.

Start with a hard refresh in your browser. On Windows, press Ctrl + F5. On a Mac, press Cmd + Shift + R.

Next, purge the cache in your caching plugin. Open its settings page and use its purge or clear cache button, then reload the page.

If you use Cloudflare, purge the single CSS file first. Cloudflare says it strongly recommends single-file purging instead of a full purge, and its Purge everything page explains the full purge option (checked November 2026).

Purge Everything clears all cached content for the zone in every Cloudflare data center, as Cloudflare explains on that same page. After a purge, the next request for a purged file returns a CF-Cache-Status header of MISS.

For a short test, turn on Development Mode instead. Cloudflare says it temporarily suspends edge caching and Polish features for 3 hours unless you turn it off sooner, as shown in its Development Mode page (checked November 2026).

Development Mode bypasses the cache, but it does not purge cached files. Purge the file as well if visitors still see the old style after you turn the mode off.

Hostinger lists Custom Purge and Purge Everything in its purge guide (checked November 2026).

If your site uses Cloudflare, read the Cloudflare setup guide to check which cache settings apply to your site.

How do I check if I edited the wrong CSS file?

Open the live page, view the loaded stylesheet links, and compare the file path with the file you edited.

WordPress.org says the instructions for styling are found in the style.css file within each theme folder, as stated in its CSS handbook page (checked November 2026).

That fact matters because a theme can load CSS from more than one file. A child theme, a page builder and a plugin can each add their own stylesheet.

Check the active theme first. Go to “Appearance → Themes” and note the active theme name, then check that you edited a file inside that theme folder.

Check the file path in the page source

  1. Open the live page in your browser.
  2. Right-click the page and choose “View page source”.
  3. Search for .css and note each stylesheet link.
  4. Compare each link with the file you edited.

If your edited file is not in that list, the page never loads it. Move the rule to a file the page does load, such as the active theme stylesheet or Additional CSS.

A child theme needs its parent named in the right way. WordPress.org says the Template field in a child theme style.css header must match the parent theme folder name exactly, as shown in its main stylesheet page (checked November 2026).

If that field is wrong, WordPress cannot match the child theme to its parent. Fix the folder name, save the file and reload the page.

Why does my CSS work in the Customizer preview but not on the live site?

The preview can show unsaved or theme-tied CSS that the live site does not use, so publish the change and check the active theme.

Starting with WordPress 4.7, you can add custom CSS from the Appearance Customize screen without editing theme files, as WordPress.org explains in its CSS handbook page (checked November 2026).

The Customizer preview shows your edits before you save them. The live site only shows them after you click “Publish”.

Custom CSS is loaded after the theme CSS, so it can override theme rules, as WordPress.org notes on the same page. That order helps only if the rule is saved and the theme is still active.

CSS changes are tied to your theme. WordPress.org says that if you change to a new theme, your custom CSS styles will no longer be active, and they return if you switch back to the old theme.

So check two things after a theme change: the active theme name, and whether the rule sits in the old theme Additional CSS. Copy the rule to the new theme if you want it to stay.

Block themes change the path. In a block theme, use “Appearance → Editor → Styles” and the Additional CSS panel there, instead of the classic Customizer. The block theme vs classic theme guide explains which editor your theme uses.

How do I fix CSS that loads but loses to another rule?

Raise the specificity of your selector, or move your rule later in the load order, until it beats the competing rule.

Specificity is the weight a browser gives to a CSS declaration when two rules set the same property on the same element. The browser applies the rule with the greater weight.

MDN describes specificity as a three-column value: ID, CLASS and TYPE, as shown in its specificity guide (checked November 2026).

Each ID selector adds 1-0-0. Each class, attribute selector or pseudo-class adds 0-1-0. Each type selector or pseudo-element adds 0-0-1.

That means #site-title at 1-0-0 beats .page-title at 0-1-0, even if the class rule comes later. A long chain of classes still loses to one ID.

SelectorSpecificityResult
h10-0-1Weakest of the three
.page-title0-1-0Beats a type selector
#site-title1-0-0Beats any class chain
#site-title.page-title1-1-0Beats a single ID

Inline styles sit above normal stylesheet rules. MDN says inline styles can be treated as having a specificity weight of 1-0-0-0, and only !important overrides them.

Use !important only as a short test, not as a fix. MDN says using !important to override specificity is a bad practice, and a cleaner selector should replace it.

If two rules tie on specificity, the later rule wins. MDN says that when competing selectors have the same values in all three columns, the last declared style gets precedence.

Check the order in the inspector. If your rule is crossed out, a stronger or later rule wins. Copy the winning selector, then write a rule that is one step more specific.

How do I force browsers to load the new stylesheet version?

Change the version number passed to wp_enqueue_style() so the stylesheet URL changes and browsers fetch the new file.

WordPress loads theme CSS through wp_enqueue_style(). Learn WordPress says the correct hook is wp_enqueue_scripts, and it handles both scripts and styles despite its name, as shown in its enqueueing lesson (checked November 2026).

The function takes a handle, a source URL, dependencies, a version and a media type. Learn WordPress says you must pass at least the handle and the source URL.

The version argument is the key for cache busting. When the version changes, WordPress adds a new ?ver= query string to the stylesheet URL, so the browser treats it as a new file.

wp_enqueue_style(
    'my-theme-style',
    get_stylesheet_uri(),
    array(),
    '1.0.1',
    'all'
);

Change 1.0.1 to a new number each time you edit the CSS. Save functions.php, then reload the page and check that the link now shows the new version.

For automatic versioning, some themes pass filemtime() as the version. That function returns the file modification time, so each edit creates a new version string without a manual edit.

How do I check with browser tools whether the new CSS loaded?

Open the browser inspector, find your rule in the Styles panel, and check the stylesheet link for the new version or new rule.

Open the page, right-click the element and choose “Inspect”. The Styles panel lists every rule that applies to that element, in order of strength.

If your rule is missing, the file did not load or the selector does not match the element. Check the file path and the class or ID on the element.

If your rule is crossed out, another rule wins. Note the winning selector and its file, then adjust your selector as described above.

Use the Network tab for a second check. Reload the page with the Network tab open, filter by CSS, and click your stylesheet to see its contents and response headers.

Look for the ?ver= value in the stylesheet URL. If it still shows the old version, the enqueue call still passes the old version, or a cache serves the old file.

Test in a private window as well. A private window skips most browser cache and extensions, so a change that shows there but not in a normal window points to browser cache.

If unused CSS is part of the problem, the unused CSS guide explains how to find rules your pages no longer need.

When should I contact my host about CSS changes not showing?

Contact your host when the new CSS shows in a private window on another network but not on your normal connection, or when no purge button clears the old file.

Some hosts cache CSS at the server level, above WordPress. That cache can survive a plugin purge and a CDN purge.

Ask the host these 3 questions: does the server cache static files, where is the purge control, and how long does a purge take to reach all servers.

Give the host the exact stylesheet URL, the old ?ver= value and the new one, plus the time you saved the edit. That detail lets support check the right file instead of the whole site.

Contact the host sooner if the CSS file returns a 404 or a 403 in the Network tab.

A missing file points to a wrong path or a failed upload. A 403 points to a file permission problem.

Cache rules can also hold old files. The Cloudflare cache rules guide explains how a rule can keep a file cached longer than you expect.

What mistakes should you avoid?

Do not edit the parent theme directly, do not stack !important rules, and do not skip the cache purge after each edit.

Editing a parent theme file is the most common lasting mistake. WordPress.org says that if you modify a theme directly and it is updated, your changes may be lost, as noted in its CSS handbook page (checked November 2026).

Use a child theme or Additional CSS for lasting changes. Both keep your edits separate from the parent theme files.

Avoid adding !important to every rule. Each one makes the next fix harder, because only a later !important rule with equal or greater specificity can beat it.

Avoid editing CSS in two places at once. If the same rule lives in Additional CSS and in style.css, you will not know which copy the page uses.

Pick one place for each rule, save it, purge the cache, and check the live page. Repeat that loop for the next change, instead of making 5 edits and then guessing which one worked.

For a full speed check after the fix, the speed up WordPress guide lists the cache and file steps that affect load time.

Frequently asked questions

How long should I wait for CSS changes to show in WordPress?

Most CSS changes show at once after you save and purge the cache. If a change still does not show after a hard refresh and a plugin purge, check the CDN cache and the stylesheet version. A server or CDN cache can hold an old file for minutes or hours, so purge the exact CSS file by URL before you wait longer.

Why does my CSS change show on desktop but not on mobile?

Mobile and desktop can load different cached files, or a media query can limit your rule to one screen size. Check that your rule is not inside a media query for desktop only, then test the mobile page in a private window. If it still fails, purge the cache and check the stylesheet link on the mobile page.

Does clearing the WordPress cache delete my CSS edits?

No, clearing a cache only removes stored copies of files and pages. Your CSS stays in the theme file, child theme or Additional CSS where you saved it. A purge forces the cache to fetch the current file from your server, so it shows your saved edits instead of an old copy.

Should I use !important to force my CSS to show?

Use it only as a short test to confirm that specificity is the cause. If the rule works with !important, remove it and write a more specific selector instead. Stacking !important rules makes later fixes harder, because only another !important rule can override them.

Why did my CSS disappear after I updated my theme?

Edits made directly in a parent theme file are replaced when that theme updates. Move your changes to a child theme or to Additional CSS, which survive parent theme updates. If you still have the old file in a backup, copy the rules from it into the safe location and purge the cache.

Sources

  1. CSS - Advanced Administration Handbook WordPress Developer Resources
  2. Specificity - CSS MDN Web Docs
  3. Purge everything - Cloudflare Cache docs Cloudflare
  4. Development Mode - Cloudflare Cache docs Cloudflare
  5. Enqueuing CSS or JavaScript Learn WordPress
  6. Main Stylesheet (style.css) - Theme Handbook WordPress Developer Resources
  7. How to clear Cloudflare cache for your Hostinger website Hostinger

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test