Solved

wordpress not updating style.css in browser

Posted on 2015-02-23
13
62 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
 

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I want to start by talking about the use of plug-ins for WordPress. I started a web-site for a company I was working for a few years ago; I had extremely basic knowledge of HTML. I am a Graphic Designer by trade so I invited the opportunity as a cha…
WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now