How to enable CSS Critical Path in Magento 2.3?

Ref: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/css-critical-path.html

When I try to enable it, I'm getting the below error.

The "dev/css/use_css_critical_path" path doesn't exist. Verify and try again.

3 Answers 3


This will probably be added in v2.3.3. This is the MR: https://github.com/magento/magento2/commit/fb9a02ae025d102744857f981b702c0fe32c23d2

  • 1
    It's weird how the documentation for this is already live and for 2.2 as well despite the files not being in 2.2 or 2.3 yet.
    – Ben Crook
    Commented Sep 9, 2019 at 13:15
  • 2
    This confused me as well and I was referred to the MR after asking around on the M2 Community Engineers Slack channel.
    – Victor F
    Commented Sep 9, 2019 at 14:42

You can enable it via admin panel Stores > Settings > Configuration > ADVANCED > Developer or via terminal.

Magento 2.4 critical css

bin/magento config:set dev/css/use_css_critical_path 1

How to use it

You can create a critical.css in your custom theme as the example below.


Reference: Magento 2.4 DevDocs - CSS critical path


Do you know how to disable it - return back to option "No". Is there CLI command or something else?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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