Question

I've started to use magento 2.2.2 and I've noticed that running static content deploy for a specific theme (using -t flag) is no more working. All themes are deployed instead of the requested one only. Am I wrong or is a M2.2 issue?

Was it helpful?

Solution

Yes,you can do static content deploy to specific theme.

php bin/magento setup:static-content:deploy --theme {yourTheme}

Example if you want static content deploy for luma theme then use

php bin/magento setup:static-content:deploy --theme Magento/luma

If you want to do static content deploy at developer/default mode then you need to add suffix -f

php bin/magento setup:static-content:deploy --theme {yourTheme} -f

OTHER TIPS

Static Content Deploy For Magento Backend Theme Using Command Line (Working on 2.1.1 or later)

php bin/magento setup:static-content:deploy --theme="Magento/backend"

Static Content Deploy For Specific Themes Using Command Line (Working on 2.1.1 or later)

php bin/magento setup:static-content:deploy --theme Magento/luma --theme Magento/second_theme

Exclude Themes on Static Content Deploy and does not minify HTML files Using Command Line (Working on 2.1.1 or later)

php bin/magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top