— Brent Mountford

WordPress CSS NOT Updating

Working live on a server today, editing WordPress CSS files. Each was taking around 10 mins to update. I’d recently swapped over from FF to Chrome for Web Dev, so I thought this might be the issue. However, according to what I’ve read, WordPress itself caches the Stylesheet.

Fixes
I stumbled upon 2 fixes, a plugin (http://wordpress.org/extend/plugins/css-cache-buster/) or modifying the your stylesheet reference (usually in the header.php file) to the this:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen" />
3 comments
  1. Ashutosh Kumar says: April 17, 20136:48 am

    Thanks a lot Brent… It worked for me..thanks a lot…

  2. Foensje says: October 22, 20136:59 pm

    Thanks! It worked perfect for me!

  3. Zack says: December 4, 20133:59 am

    Just spent 6 hours trying to figure this out, thanks man!

Submit comment