WordPress styling does not display without clearing cache - wordpress

I am building a WordPress website with an Underscore theme, it is hosted on flywheel. Everytime I make changes to a page, the styling style.css file is not picked up unless I do a hard reload/ clear cache.
Obviously I want it to load on everyone's computer immediately without the need to clear the cache. What is the reason for this? and how can I resolve it?
thanks.

You must change your theme version every time you make change in your style.css file. version will be appended to the URL as the query string. A version identifier is used to cache-bust the URL. The browser will detect the URL – with the query string – as a new and updated file rather than a cached resource.
see WordPress Theme CSS and JS Cache Busting

Related

Wordpress old/updated/deleted CSS files are being served minified and I cant delete them. Why?

Backstory
We are using a LAMP stack (bitnami) to run a multisite Wordpress instance. This is the second time I have ran into a file that will not update when we push an update (We use git and pull the latest changes to the bitnami server).
We have noticed that when deleting (renaming for that matter) the file, it can still be retrieved by performing a GET on the resource (or the url in a browser). Also, if we were trying to make changes the changes do not come with the file - it is still the old file. Interestingly enough, the file is minified, which because of issues with this in the past we do not use any plugins that minify our CSS. So there should be no reason for it to be minified.
We have WP Total Cache - clearing all caches is successful but does not stop this from happening. (We used to use WP Super Cache, when this bug happened we decided to change plugins to WP Total Cache and purged the cache and it fixed the problem - but it is back and that no longer works).
I have also seen the trick where we can use a "?ver=###" query param on the url. This works but this would prevent us from using CloudFront for our files (currently disabled for all this testing so its not the problem either). Also I am not convinced it is a long term solution - or a solution at all since these minified files are being created and shouldnt be in the first place.
Additional information
It may not be helpful, but the files we have noticed this with are in a theme folder that is not technically an active theme. We just use the folder for additional resources that we have created ourselves. We reference them in the head of some pages.
Example:
/wp-content/themes/active-theme <- The active theme
/wp-content/themes/resources <- Our custom resources
Questions:
Where is this file being stored?
How can I delete it?
How can I prevent this from wasting our time ever again?
I found that the issue was with the bitnami server itself. The Apache2 module PageSpeed was causing the served files to be minified and cached resulting in the pages never updating no matter what we did on wordpress.
Apache:
To disable PageSpeed, comment out the following lines in your httpd.conf (/opt/bitnami/apache2/conf/httpd.conf)
#Include conf/pagespeed.conf
#Include conf/pagespeed_libraries.conf
Solution found here

remove cookies when i need from visitors wordpress

I used wordpress and w3 total cache when i install this plugin to make my site more faster and everything good but if i try to edit any Cascading Style Sheet or JavaScript files i must delete cookies and cache to results of this edit appear.
What can i do to solve this problem ? If i try to make any changes this changes will not be appear to users, Their must be waited at lest month to view this changes.
Because that i need anything to delete cookies of users when i need to do it.
Thanks
What you are looking for is a technique called cache busting. Essentially what it is, is that your server and cache is working together and find a file on the server and in the cache with the same name. If your css/js would change name efter every edit a new css/js name would appear and thus a new request has to be made. That's cache busting you ya.
Read more about it here! https://gilbert.pellegrom.me/cache-busting-wordpress-style-css/

Wordpress CSS updates appear after delay

I am using an FTP client to download/edit/upload CSS files of my child theme. Typically that worked smoothly and updates were seen after refreshing the page in the browser immediately.
However, on my current fresh wordpress install, I see changes in my CSS only after a few minutes, which makes the whole process really annoying. I don't quite know what I am doing wrong.
Here are some details of my setup:
I use a child-theme which uses the twentythirteen theme as a parent.
It's definitley not a browser cache issue, since I work on chrome incognito mode with the dev-console opened (and enabled Disable cache (while DevTools is open) checkbox)
One strange thing I observer is, that, when accessing the child theme's CSS file directly in the browser it appears differently sometimes. I suspect, Wordpress is somehow accessing the CSS file and if there was a change, it caches the file and from then on returnes a minified version of the CSS. Maybe this is the root cause of the error. This is what the file actually looks like:
This is what the same file most of the times looks like when accessed via the browser directly:
This is the excerpt of the child-theme's functions.php which shows how the child-theme's style is included. Maybe I am doing something wrong here: http://pastebin.com/0MRjTTjf
Hope you can help me.
My Webhoster has enabled mod_pagespeed by default. I had to turn this off via entering ModPagespeed off in my .htaccess file. Abhik also pointed to this in his comment.

Wordpress css won't change unless I edit cache/combined.css

I've made changes to some css but they don't go into effect. I have to edit a file in cache/combined.css. Did wordpress create this file?
Yes.
It is part of a caching system to speed up to Wordpress site to run faster. You probably have a caching plugin enabled and what you would need to do is use the feature of that plugin (if there is one) to clear the cache.
Alternatively, you could just delete that file out of cache and it should re-cache the new file on next page load.

Why after updating a custom WordPress theme it doesn't change?

I bought a theme for WordPress and when i try to edit the theme it would not change a thing.
i even deleted images and background from the theme and it somehow still shows up on the page like its being cached somewhere. I cleared my browsers cache and just to be sure i tried to visit the my website on a different computer and the same page shows up.
My question is does WordPress cache images somewhere automatically? if yes is there any way to flush it?
WP doesn't cache anything unless you have any caching plugins enabled. Try disabling all plugins and double checking that the files you deleted are really the ones that you're seeing in your browser.
Right click on any images to get their source then compare them with the path of the image on the server, are they the same?

Resources