• Hello,

    We love using the Astra theme, but the theme has a Dynamic CSS feature that is constantly creating and updating files in the following directories:

    /wp-content/uploads/astra
    /wp-content/uploads/astra-addon

    This is a good feature, but it has some disadvantages.

    For instance, we are using the Litespeed plugin as an optimization tool on our site, and our cache timeout value is set to one week.

    However, if the Dynamic CSS feature updates every 24 hours, these CSS files are renewed, and their permalinks are updated.

    Since the Litespeed cache plugin doesn’t perform a purge, the changing CSS links in the theme result in 404 errors.

    Example:

    Failed to load resource: the server responded with a status of 404

    /wp-content/uploads/astra/astra-theme-dynamic-css-post-54927.css
    /wp-content/uploads/astra-addon/astra-addon-dynamic-css-post-54927.css


    As the Litespeed cache is not cleared, these files cannot be found, causing 404 errors, and leading to broken fonts and CSS layouts, which result in an unattractive appearance.

    I couldn’t find how to disable Dynamic CSS in the theme settings.

    What can I do to deactivate this? Can you help me? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • GinaV

    (@ginavicente)

    I’ve had the same problem. For now, I’ve managed to fix it by making a small change to the .htaccess file.

    In the section where the Lite Speed Cache settings appear, it shows by default:

    graphql

    Copiar código

    ### marker CACHE RESOURCE start ### RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600] ### marker CACHE RESOURCE end ###

    I’ve changed the value to 604800 to see if it makes any difference while I search for more information on the issue. By default, the value is set to 3600. At least this lets me keep serving the cache more consistently.

    Thread Starter meoman

    (@meoman)

    Hello, and thank you in advance for your response and help.

    Our store is very large, and we have a lot of products.

    We have approximately 10,000 products, and our main goal is to keep the cache lifetime at least 15 days.

    Because 1600 seconds is very insufficient for us, and our resources are limited, when the cache system starts rebuilding the cache every 1600 seconds, we constantly need to create different cache files for mobile and PC.

    This means a large number of requests for many pages. What we actually need is to somehow extend the timeout period for the dynamic CSS files supported by the theme.

    This might be a possible solution.

    Hi @meoman,

    If you don’t want this, you would like to disable the File Generation feature.

    Anyway, since this is related to a feature that is coming from the Astra Pro plugin, we cannot discuss this further in this forum, as mentioned in the Forum Guidelines. Please reach out to us thru our Support Portal if you need further assistance, and mark this topic as Resolved.

    Kind regards,
    Herman 😊

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Astra Theme Dynamic CSS’ is closed to new replies.