[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

wordpress not updating style.css in browser

Posted on 2015-02-23
13
Medium Priority
?
144 Views
Last Modified: 2015-03-03
I am trying to work updating css on a site in wordpress.
I am finding that even though I update the style.css its not updating on my site.
If I look in my resources it says it's loading style.css?ver=1.0
How can I get it to update in my browser?
I looked and I don't have any cache type plugins.
0
Comment
Question by:rivkamak
  • 6
  • 4
  • 3
13 Comments
 
LVL 17

Expert Comment

by:OriNetworks
ID: 40627360
You dont need any plugins for cache, the browser caches files by default. Clear the cache of your browser and you should get the new style.css if you mention what browser you are using i can also provide directions.  It might also help to use developer tools that come with your browser to see if the style.css that is loading. For example F12 developer tools while using internet explorer has a network tab that you can use to see if the style.css is loading a cached file (http code 304) or fresh from the server (http 200)
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 40627912
This is a common problem with Wordpress. There are numerous solutions like this one to combat the problem.

http://www.quickonlinetips.com/archives/2011/12/force-browser-css-refresh/
0
 

Author Comment

by:rivkamak
ID: 40628424
I'm using chrome and firefox.
even when I force a full refresh or open incognito,  i'm still seeing the old style sheet
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:rivkamak
ID: 40628454
I cleared my cache. I tried the idea from that file you included to tell it to put a different version number up there, but it's still showing ver=1.0 even though I put a different version number in my functions file

You can view my site here:
http://devorah.designalivesandbox.com/site2/
The words in large that say "our courses", is supposed to be in yellow, not black.
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 40628666
This style.css: http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite/style.css

When I put that url in a browser that has never visited that site (no cache, no version number), it should give me the file straight from the server with the font color set to yellow. But it doesn't. The color is defined as #192836. The developer tools show code 200 for the style.css file on the site.

There has to be something more basic than a cache causing this.
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 40628734
Since i am most familiar with IE developer tools i can give you an example of how i would check if the element is using the style from styl.css.

Im developer tools use the first tab (dom explorer) to select an element that contains font that you think should be yellow. On the right side it will display the style inheritance. Check to make sure styl.css is listed and using the font-color property and value you expect. If it is crossed out, find the style above that is overwriting the property. If it is not listed, you may have to adjust you css selector in style.css
0
 

Author Comment

by:rivkamak
ID: 40628801
I am refering to the child theme that isn't updating
http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite-child/style.css
this file shows up with custom css classes. But if you load the site itself, they don't show up.
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 40628810
I understand unfortunately im not in front of a computer with tools right now otherwise i would check for you. The same steps i have explained can be used to see if the child theme is being overwritten or even being evaluated at all
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 40628954
I can tell you that the style is not being overridden. Read my comment 28623033

This is the only definition listed and it's from style.css.

#features-two h3 {
    color: #192836;
    font-size: 39px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    width: 100%;
}
0
 

Author Comment

by:rivkamak
ID: 40629286
My point is not if my specific class is being overwritten or not. my point is that it is not loading the correct stylesheet into my browser.

when you load the stylesheet itself it shows version 1.1 in the comment.
if you load my website, the file css that is loading is 1.0

why is wordpress pulling an older version and not updating the cache?
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 40629340
Here's the problem.

This file has the color change. Note the folder cw-business-lite-child:
http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite-child/style.css

This file is what is being called from the page. Folder cv-business-child:
http://devorah.designalivesandbox.com/site2/wp-content/themes/cv-business-child/style.css?ver=1.0
 
The latter style.css file has this import statement. Note the folder cw-business-lite:
@import url(../cw-business-lite/style.css);

http://devorah.designalivesandbox.com/site2/wp-content/themes/cw-business-lite/style.css

Does not have the color change.
0
 

Accepted Solution

by:
rivkamak earned 0 total points
ID: 40630904
I solved the problem.
I needed to install a plugin called 'clear cache'
Thank you for your help anyway
0
 

Author Closing Comment

by:rivkamak
ID: 40641437
No one else got the correct answer. I solved it myself.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Transferring a wordpress site from a host or local dev server to another host can be a pain. So I've included my steps on how I have accomplished this task. Steps include an assumption that you have Cpanel access or Ftp access.. If you do not hav…
In Part I (http://www.experts-exchange.com/Web_Development/Blogs/WordPress/A_8410-Getting-Started-In-WordPress-Part-I.html), I introduced you to the powerful WordPress backend, the WordPress administrative Dashboard.  In Part II, I will introduce yo…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question