Updates to Wordpress theme template/stylesheet are not reflected when a file is edited - wordpress

I am developing a theme in Wordpress. I have an issue where updates to my stylesheet (style.css) are not being reflected in the browser after FTPing a new version of the file to the server. Edits will only show up in the browser after waiting a long time, (15+ minutes). I have tried all the things mentioned here (edit: now updated to address the issue), which have not worked. These include:
Making sure no caching plugins are installed in Wordpress
Clearing the browser cache
Trying from a different browser
Making sure I am editing and accessing the correct file
Checking webhost configuration panel for a caching plugin
Something seems to be caching the stylesheet but I'm not sure how this might be so.

It turns out that my hosting company (Certified Hosting) uses a webpage caching plugin called Varnish on their shared servers. Unfortunately there is no mention of this in the configuration panel - the only way to disable it for the domain is to submit a support ticket. Once they fixed it on the backend, my changes are now correctly being reflected without having to wait a while as before.

Related

Changes made in WP_Elementor but not published in live site

I have made a small text change on one of my wordpress website using elementor 3 but is not able to publish on live site. Solutions that I have tried so far but unsuccessful.
Clear Browser cache, WP plugin cache and purge website server cache.
Made changes again and view in incognito mode
Change Elementor CSS Print Method to Internal Embedding
Regenerate CSS and data in Elementor tools settings
Note: The only way I see change made is by adding ? (querymode) to the url, but not without that.
The issue we were having was due to old hosting, since the DNS was pointing to old host, the changes made was reflecting in old WP admin but not in new one
All we have to do is point the DNS to new host. That resolved a problem .

Wordpress: pages are not updating despite emptying caches

I have used the plugin All-in-One WP Migration to get the site from the development environment to the live site (you can export and import a complete website).
Some pages have updated correctly but not all of the pages (they remain in the old style and structure).
I have deleted my browser cache several times (tried several browsers on different computers even), deleted caches created by plugins several times (tried deactivating those plugins as well). However, despite trying to delete all the caches I can think of, some pages are just not updating. As the page templates for these pages do not exist anymore on the server, I am at a complete loss as to what's preventing all the pages from updating correctly.
What am I missing?
May I ask is your site already live? Cause I had the same issue as yours and I manage to get it updated by deleting the cache by "Flush Cache" on my WordPress admin page
Once you logged in to your WordPress admin site you'll find this and click that
Flush Cache
Flush Cache (2)
I am not so sure why that happens but I am thinking it might be because from the server and might need sometime on updating any changes made. It happened to me also when I have some updates on my site then once I save everything and go to my site, still the old ones are being shown but when I Flush Cache then it shows up the new ones... I think the reason because it still shows up the old ones is probably of the cache from the old ones in the server and by flushing them is being able to show the updated ones.

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

Only a hard refresh will display the updated WordPress site

I cloned a website using the duplicator plugin and made changes to it. When logged in as admin I see the changes but when I use an incognito browser it still shows the cloned version (old version). I can see the changes when I do a hard refresh of the browser, but refreshing again reverts to the old copy. I tried emptying the cache, deleting cookies, deleting cache folder on wp-content but nothing seems to work?
I don't have any caching plugins installed.
The css changes seem to take effect, but the old pages are still loading.
It seems like the pages are somehow cached somewhere.
I had the hosting support check and they updated the A records but it still somehow doesn't fix the issue.
It's in a shared hosting on hostgator
Thank you.
Though this question does not follow guidelines of this forum, but you seem to be freshie. Just check if you are using cache plugin, then disable that for time being unless you follow proper documentation of that plugin and complete know-how about clearing cache.
By any change are you using wp fastest cache or W3 Total Cache plugins.
Please double check you are not using any cache plugins
make sure you dint enabled the cache in wp_config file
define('WP_CACHE', true);

Magento CSS not updating after copying site to another server

I done things a bit backward developing my new site, don't ask me why! But i built the site on the live server it will be hosted on first and the other day i created a sub-domain to hold a copy of the website so i can use it as a sandbox environment and test new plugins, to get PayPal working etc
I followed this tutorial
So it all worked fine! i have a copy of my site on a subdomain working. I had the infamous admin login redirect to itself issue but i sorted that, the reason it wasnt working was because i had my caches disabled in magento before i copied the site. So i had to enable them again in order to gain access ( If anyone knows why this is please share).
So my problem now is, i am updating the design of my website using the css and images in the skin folder. The problem is i update something in the css and load it onto my server and into the subdomain skins folder but nothing changes on the frontend UNTIL about 15 minutes later and me clearing all caches hundreds of times!! i really don't understand whats happening?
The links to my css/js and image folders are all correct in the head of the website. It's just like a time delay between me changing something in the css and the website updating itself.
Any information would be greatly appreciated.
Kind regards
Tom
Have you also disabled cached on Magento Admin? Perhaps you can try reloading the site on a non-cached based version of browsers (e.g. Incognito Mode in Google Chrome).
Your browser is also caching the external css files which is basically good for saving bandwidth of server and reducing page loading speed. But, for development purpose, you need to avoid css caching. On firefox or IE, you can use CTRL+F5 to reload a webpage without cached css.
If you do not want to use CTRL+F5, you can also add timestamp to your css file as URL parameter.
For example, style.css?<?php echo time();?>
You can also use Apache module to expire the caching.
.htaccess
ExpiresByType text/css "access plus 1 second"
http://httpd.apache.org/docs/2.2/mod/mod_expires.html

Resources