Wordpress CSS updates appear after delay - css

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.

Related

Styling not refreshing for old visitors on WordPress

I’m working on correcting a styling of an element on an WP-based eCommerce site.
The site has both SCSS and CSS files.
To make things quick, I edited the CSS via Appearance -> Customize -> Additional CSS.
However, when I was done and published my changes (and solved the issue), only those new to the website sees the difference.
Those who have visited the site prior to the deployment of the solution, still see the distorted number layout
I also suspected that the SCSS gets compiled every refresh but when I checked the File Manager (cPanel), only the CSS files get modified.
I’m feeling this might be a cache-related issue. I have already disabled a cache plugin (WP Rocket). However, the problem still persists.
What possible issue am I experiencing?
Edit: I did try to use Incognito and the change did reflect. However, the users of the site are non-techy people and don't know how to refresh.
The site is using GoDaddy as the host. Is it possible the issue is on that part?
Thank you

What could cause my browser to load a nonexistant webpage other than a browser's cached files?

I am working in AMPPS on a wordpress theme (on a Mac OS). While working on the pages.php file, I made some changes and saw no effect. As a test, I temporarily deleted all code in the file and saved it. For some reason, the link ISN'T broken...it loads the page as if the code was all there. So I tried to trash the file, and now a nonexistent page is loading. It loads page.php even though the file isn't even in the theme's folder. I've tried clearing my cache, restarting the browser, even using a different browser. Nothing works...the page keeps loading as if frozen with some very specific exact code. It's acting like it's a cached file, but I've even disabled cache under developer tools (in Chrome). That wouldn't explain why it's loading in Firefox anyway.
What could be causing this and how do I fix it? It seems I'm not seeing ANY changes that are made to that page.php file... no changes in HTML and no changes even if the file is trashed or all the code is deleted. Is this an apache cache? (I never set one up).
This has got to be a cache somewhere...right? Not sure how to fix it?
Depends on your theme. Wordpress will default to index.php in the absence of a page.php file. If you disable all caching plugins I wouldn't think cache would be a factor. One thing that may help you figure this out is adding the following line of code to your page.php, index.php and any other page templates you have (single.php, archive.php, etc).
<?php echo __FILE__; ?>
I solved the problem. Apparently Wordpress was taking the information from single.php and using that. Any changes I made to single.php would go into affect. Once I removed single.php, then Wordpress started pulling the code from pages.php

WordPress styling does not display without clearing cache

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

Style.css link is showing the old copy of style.css

I have made some changes in style.css and uploaded it online. However it is not showing me required results. i.e it is still taking the old style.css codes.
I am able to view changes offline but when i give it full href link it is not showing me necessary results.
Help!!
It seems like there is a cached version that you are viewing. Try clearing the cache in your browser and reloading the page. If that doesn't work then most likely the web hosting you are using is caching the stylesheet.
Open website with another browser. If css is still old, I can tell you that you have definitively not update the css file.
Another thing to do is to clear cache of your browser. It is possible you are viewing cache. Which browser are you using? Check how to clear cache.
You're probably using a cached version of your CSS. If this happens in other browsers too, then problem is in somewhere else.
You can fix this by:
clearing the cache (see refreshyourcache.com) or
going to your CSS path by browser (e.g. mysite.com/css/file.css) and refreshing the page.
doing force refresh (usually Ctrl+F5 or F5)

Wordpress Stylesheet isn't updating on front end

I'm working on a site for a client that was built by someone else, and I'm having issues with a stylesheet not updating on the front end
The site is http://www.hamiltonkarate.co.nz/, and I've tried to update the stylesheet and footer files. Now the footer file updates, but the stylesheet doesn't. I've tried deleting the stylesheet from the server but it's still there somehow, even though I can't find any cached files on the server.
The other weird part is that if I go into the theme editor in the dashboard, it shows up my updated stylesheet there. I've checked the relative paths etc, I've debugged, but I can't find out why the sheet isn't updated. I've tried hard refresh, other browsers/computers, and even incongnito mode with no luck.
I've uploaded the updated css to http://www.hamiltonkarate.co.nz/wp-content/themes/hamiltonkarate/css/screen.css, and if I update the CSS link in developer tools it works fine.
Can anyone see what may be going wrong here?
Please check file permission for your css file. It should be writeable

Resources