Wordpress css won't change unless I edit cache/combined.css - 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.

Related

Theme in WordPress

I'm trying to modify a theme in Wordpress, I'm using it in a local server, but when I modified the style page of the theme, I don't see the result in the page.
My question is if someone knows How to fix the problem or well, How to modify the theme, but with really changes.
Make sure that no caching plugin like WP super cache or WP Rocket is enabled. Finally, make sure the style.css file is writeable by the server with permission like chmod 755.
If the above does not help, you can use a custom CSS plugin (https://en-gb.wordpress.org/plugins/simple-custom-css/) and add your CSS code using its interface (cleaner and less hassle for everyday users).

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

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

Buddypress reverting code back to original plugin, I lost my all modification to plugin. I am running wp-4.4 and buddypress-2.2.4

I have buddypress 2.2.4 installed with wordpress 4.4.
Now issue I am facing is, I did some modification to buddypress plugin in plugin files it self. And its reverting back. Its changing my modified files to its original versions. even I try this in my local and same result.
I ask server guy but he told its buddypress issue.
When you modify a BP file, do you see changes in the browser? Or do the files revert to the original state instantly after closing them in a code editor? What are the file permission settings for the BP plugin files?
What files do you modify and with what changes?
Are you hitting update for the plugin? Plugin updates always overwrite local changes as new files are written over the old ones (unless you juggle with write-permissions for the files).
It is not a BuddyPress issue by itself (tried it myself and I could hack the plugin files just fine). It could be the server giving you the illusion of write-allowed files whilst keeping the files unchanged ("reverting"). Or then the plugins are updated constantly, undoing your changes.
The proper way to make modifications is to either use hooks in a plugin or a theme, or copy over the BuddyPress templates to your theme and make modifications there.
I didnt find any solution to that. but I keep my changes by adding a override files to child theme. because I tried everything and its not stopping reset plugin.
So finally making override of plugin in child theme solve this issue.

Does W3 Total Cache modify original css/js

I am looking to get w3 total cache going on my wordpress install.
I've done some searching, but I can't find out if the minification feature actually removes all the white space from your original css & js when you opt in for that.
I don't want to have all the white space removed, then need to make a change and have no readable code.
So ultimately I need to know whether I always have to keep my original somewhere else as another backup before turning this thing on.
Also, when you update something on your site, does w3 total cache rebuild the cache so the new post will appear on the home page for example.
Thanks for your input.
Well the way w3 total cache works is that it creates a cache folder in your wp-content. So after a few minutes it re-compiles all the css and js files and keep them in the cache folder. The website then directly links to these cached files, instead of your custom files.
In short it does not modify any existing files, it just creates new cached files. And when ever you make changes to your css/js, you just have to flush the cache and it will delete the previous cached files and create a new batch of cached files.
But your css/js files have to be enqueued, so this will let w3 total cache know which files it needs to minify and in which order. If you are using a wordpress theme then by default it should have all the enqueues in place.

Resources