Not able to see CSS changes

Has anyone found a REAL solution to this? I recently started using Local and this is really making it a no go for me. Using some of the different approaches outlined here and a few other threads I can get it to work temporarily but after a few style changes it stops working.

What I’ve tried:

1.) Turning off "Faster Docker Volumes"
2.) Disabling browser cache
3.) Refreshing cache

Any help would be appreciated.

Casey,

Sorry for the trouble!

Which browser are you using?

Also, are you using the “Preferred” environment or the “Custom” environment?

Thanks for getting back to me. After working on this for a few more hours it seems to be working now. It seemed that some combination of these steps done several times in addition to restarting my machine and Chrome has somehow solved the problems. Strange.

1.) Turning off "Faster Docker Volumes"
2.) Disabling browser cache
3.) Refreshing cache
4.) Restart Chrome
5.) Restart machine

I seem to be having the same issue as others. I tried the following steps but didn’t have any luck. Any suggestions?

1.) Turning off "Faster Docker Volumes"
2.) Disabling browser cache
3.) Refreshing cache
4.) Restart Chrome
5.) Restart machine

Likewise, this caching issue is driving me nuts. It started to appear somewhat recently, within the last 4 months or so, because i’ve been using Local/PressMatic for years (before the Flywheel acquisition), and it recently started with a new project I was working on. I assumed the issue was caused by some plugin that my client had installed and I mostly ignored it, using an annoying work-around… But I just started a fresh project and here it is with the latest project, with no additional plugins installed.

The workaround I use is to open my CSS and JS files in separate tabs and then reload them manually, which causes the browser to pull the latest change when I go and reload the main WP tab… But this is obviously very annoying and time consuming.

I’m using the default site settings, but I had ‘Disable Faster Volumes’ turned off before (because there was an issue with fast volumes and WooCommerce), and so toggling that didn’t do anything. Dev Mode is also already on in my projects in Local.

I’m using:
OS X (High Sierra, 10.13.1)
Chrome (Latest)
nginx
MySQL 5.6.37
PHP 7.1.7
Local Environment ‘Preferred 1.1’

Hoping this can be revisited and patched soon. It’s something that was introduced in a relatively recent update, because Local had always run fine for me locally, and now it’s bordering on unusable … except I have a high level of patience.

Thanks!

Following up on my own post, I continue to have this problem even with Faster Docker Volumes turned off. For me, it tends to happen once per session, per site, where I have to force a refresh of CSS by changing it’s filename (in my case I have style.css?v=1.0.0 so I just change it to style.css?v=1.0.1 in header.php.)

Local 2.1.1
All sites using a “custom” environment
OS X 10.11.6

@mikem,

Sorry for the trouble!

Do you have this problem with sites using the Custom environment?


@raglan,

How old are these sites in Local? Does this happen with brand new sites using the Custom environment?

Old enough that they have a .dev URL instead of .local. One was created Oct 18, 2017, the other Sept 19, 2017.

Sorry but I don’t have time to set up a new site and test now…

Add me to the list of people who’ve started having this issue. Extremely frustrating.

I recently turned off “Faster Docker Volumes” due to plugin update errors. Not sure if this has anything to do with the issue.

I’m on the latest version of MacOS. I was testing in Safari, Firefox, Chrome, Opera and still couldn’t get my site to load the updated files. This is an issue with Local as I turned off the site and turned it back on and then it saw the latest version of my JS file.

Here are my settings: https://cloudup.com/cftSMBFsoyk

@TwisterMc,

Please try exporting the site and then reimporting. Try selecting “Custom” instead of “Preferred” when you are on the “Environment” panel.

I set all mine up as custom as I want to use PHP 7. This is a site that I’ve had for a while and the issue just started in the past few days. So maybe I just need to restart my machine.

This is a real problem that renders Flywheel unusable. I’ve had all the same issues and tried every solution all the posters here have tried. No luck.

Here’s what i did to solve that problem for me

in functions.php
wp_enqueue_style(‘University_main_styles’, get_stylesheet_uri(),NULL,microtime());

I included microtime and it works …hope this will help you as well

I did the following for my main CSS file. It adds a version number equal to the last modified time (UNIX timestamp) of the CSS file, so it updates automatically anytime you update the file. I have this in my header.php:

<?php $cssver = filemtime( get_stylesheet_directory() . '/style.css' ); ?>
<link href="<?php bloginfo('stylesheet_url'); ?>?v=<?=$cssver?>" rel="stylesheet" media="screen" type="text/css"/>
1 Like

I’m having the same difficulties as the OP, with sites imported from MAMP Pro in Local 2.2.4, MacOS 10.13.3. CSS changes are not reflected in the browser.

  1. Changing from Chrome to Firefox makes no difference.
  2. Turning off Faster Docker Volumes causes my sites to fail to load, even after restarting Local
  3. Changing from Preferred to Custom makes no difference
  4. Dev mode is on

I’m using hard page reloads in Chrome (shift-command-r) as a workaround.

Coming from MAMP Pro, I really want to like Local. But this is another place where Local – which otherwise looks very promising – isn’t ready for prime time. Smashing the elephant is a little premature…

@raglan’s reply is a pretty good solution.

Also, if you’re enqueuing your style via functions.php, do it like this:

$cssver = filemtime( get_stylesheet_directory() . ‘/style.css’ );

wp_enqueue_style( ‘your-style’, get_stylesheet_uri() . ‘?v=’ . $cssver );

Just downloaded flywheel to try today for a child theming project. I’m experiencing the same issues described on this forum. Is there a solution that works?

Hey all,

We’re going to be making adjustments to the caching in the upcoming Preferred and Custom Environment updates. Thanks for all of the feedback!


@bresson, does this work for you?

This solved my problem! Thanks dude

For those still having this issue, version 2.3.2 environment update solves it. :point_down:

image

1 Like