3

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?

3

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

  • I never tried with --theme. I always used -t that in M2.1 was perfectly running – Daniele Rovatti Apr 16 '18 at 19:00
  • try it.i will work – Amit Bera Apr 16 '18 at 19:01
1

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

  • @DanieleRovatti You can accept answer if it's useful for you. So, other user can use this answer for solve query. – Rohan Hapani Apr 16 '18 at 19:24

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.