# Changes to CSS don't happen instantly after refresh / hard refresh

**URL:** <https://community.localwp.com/t/changes-to-css-dont-happen-instantly-after-refresh-hard-refresh/43314>\
**Category:** Bugs\
**Tags:** windows-10\
**Created:** [June 13, 2024, 7:49pm UTC](https://community.localwp.com/t/changes-to-css-dont-happen-instantly-after-refresh-hard-refresh/43314 "2024-06-13T19:49:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![josefsalazar](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/josefsalazar/32/22014_2.png) [@josefsalazar](https://community.localwp.com/u/josefsalazar)\
**Post date:** [June 13, 2024, 7:49pm UTC](https://community.localwp.com/t/changes-to-css-dont-happen-instantly-after-refresh-hard-refresh/43314/1 "2024-06-13T19:49:26Z")

</div>

# Bug Summary

I’ve been using local for over a year now and it’s a wonderful product, however since the last week every time I make any change to a CSS file it doesn’t reflect in the website I’m building. I have to refresh / hard refresh 5 times or more for it to work. This is beyond frustrating.

I enqueue my stylesheets with filemtime PHP function so it always uses the latest version of my css.

# Steps to reproduce

Create a new local instance, create a theme, add the basic files (index.php, functions.php, and style.css). Enqueue your stylesheet and use wp\_head and wp\_footer respectively.

This is my enqueue function:

```auto
function gdc_enqueue_styles() {
    $stylesheet_uri = get_template_directory_uri() . '/style.css';
    $version = filemtime(get_template_directory() . '/style.css');

    wp_enqueue_style('gdc-main-stylesheet', $stylesheet_uri, array(), $version);
}

add_action('wp_enqueue_scripts', 'gdc_enqueue_styles');

```

This is what has worked for me for the past year and all of a sudden it just doesn’t work any more.

# Environment Info

I’m using Windows 10

I use the default environment

My localWP version is: Version 9.0.3+6684

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [June 13, 2024, 8:09pm UTC](https://community.localwp.com/t/changes-to-css-dont-happen-instantly-after-refresh-hard-refresh/43314/2 "2024-06-13T20:09:24Z")

</div>

Hi @josefsalazar

Have you tried setting this into your wp-config?

`define( 'WP_DEVELOPMENT_MODE', 'theme' );`

> **[Configuring development mode in 6.3](https://make.wordpress.org/core/2023/07/14/configuring-development-mode-in-6-3/)**
>
> WordPress 6.3 introduces a new concept called “development mode”, which affects certain nuances in how WordPress behaves. Going forward, sites will be able to configure their development mode using…

---

<div class="post-metadata">

**Author:** ![josefsalazar](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/josefsalazar/32/22014_2.png) [@josefsalazar](https://community.localwp.com/u/josefsalazar)\
**Post date:** [June 14, 2024, 1:03am UTC](https://community.localwp.com/t/changes-to-css-dont-happen-instantly-after-refresh-hard-refresh/43314/3 "2024-06-14T01:03:09Z")

</div>

Hey, thanks for the quick reply.

I did add that but it didn’t solve it.

Any other ideas? I’ve been browsing the forums and all the other questions similar to mine are way too old to apply

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [June 14, 2024, 1:12pm UTC](https://community.localwp.com/t/changes-to-css-dont-happen-instantly-after-refresh-hard-refresh/43314/4 "2024-06-14T13:12:28Z")

</div>

Is this a child theme to a parent? Or just it’s own custom theme?

Aside from your theme do you have any other plugins on the site that could be interfering? Builder plugins for example like Elementor have CSS Regeneration options that need to be flushed as well.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [June 13, 2026, 7:49pm UTC](https://community.localwp.com/t/changes-to-css-dont-happen-instantly-after-refresh-hard-refresh/43314/5 "2026-06-13T19:49:55Z")

</div>

This topic was automatically closed after 730 days. New replies are no longer allowed.
