How to see changes to style.css immediately in WordPress

Browser and server cache can be really annoying especially if you constantly make changes to your site through the CSS stylesheet. To work around this, you just need to replace the style.css call in the functions.php file of the theme with this code.

This will append a ?ver= string with the timestamp of when the stylesheet was modified. This will tell the browser that this is a new file and not use the one in cache. This also works for other CSS files as well.

Elmer Balbin

Full-stack developer from Bacolod, Google Local Guide, Agoda affiliate and casual DotA 2 player.

Buy me a burgerBuy me a burger

1
Leave a comment

avatar
newest oldest
trackback
How to see changes to js files immediately in WordPress

[…] is similar to my other tip but this one is for javascript files. This modifies the ver parameter to output the current time as […]