CSS not updating on live server but works on development environment

Posted April 27, 2016 14.7k views

Usually, some images are cached. My Yii app has some caching but not usually for CSS that I know of. I made the CSS changes and could see the changes take effect on my local development environment but not on live server. I attached two photos of development environment that has the black font and updated navigation bar and the live site that is CSS changes aren’t taking effect with the black font and the navigation bar. All I know what to do is wait and hope that it’s changes take effect. I’m running Apache PHP MySQL and am the developer but didn’t install the server and don’t know what settings are on it to make the changes.

1 comment
  • First add css files to the server and then check it.

    most of the people are not aware of how to publish items in iis.

    Make sure everything is working finr.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

The first thing I would check is if the site is using a caching proxy service like CloudFlare. This would be set up in the domain’s nameserver settings with the registrar. If a service like this is being used, changes will not appear until the current cache has expired.

Another possibility is that your ISP is doing some caching of their own and is maintaining a cached copy of the old content.

  • Not a good answer . go and study well in university

    • Thank you for the feedback though providing a bit more detail would be helpful. Since this answer pinpointed the OP’s problem allowing them to resolve it I fail to see the issue. This is a community based around sharing knowledge so if you have a better solution or more insight to share I encourage you to do so to the benefit of all community members.

  • This was exactly what was causing it for me, thank you very much!

Thank you! That was it. I use CloudFlare and they were caching my CSS. I found they have a ‘developer mode’ that temporarily turns this off. Problem solved.

  • Thank you for asking this question, and thank you @ryanpq for the solution. I was going mad trying to figure this out. Temporarily putting CloudFlare in developer mode helped fix the issue.

    Update: Just wanted to add that once I turned off development mode, the issue returned. Turns out I had to purge the cache after turning off developer mode.

Thanks ! yep it was cloudflare