0

After updating the style.css in Appearance > Theme Editor > stylesheet(style.css), I refreshed my site, then saw that the style was not applied.

I've also tried clearing the browser cache and using cmd + shift + r to re-download the resources, but it still is not working.

I have NO Cdn enabled.

Is there any way to make the site live for development, or is there any preferred way for development?

In style.css

...
/*
Author: xxx Limited
Description: This is the template for xxx
Version: 1.0.0. // tried to update the version here but not working
... 
*/
.....
1

This most likely is a caching issue on the server side. Check in your functions.php if the stylesheet is enqueued using the version number. Failing to do so is the most common reason WordPress caching plugins ignore updates to style.css. It should look a bit like this:

    $theme_data = wp_get_theme();
    wp_enqueue_style('main-style', get_template_directory_uri() . '/style.css', '', $theme_data['version'], 'all');

Otherwise, it might be that the webserver software is caching agressively. In that case waiting a few hours may be your only recourse.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.