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?

asked Apr 16, 2018 at 18:50

2 Answers 2

6

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

answered Apr 16, 2018 at 18:57
2
  • I never tried with --theme. I always used -t that in M2.1 was perfectly running Commented Apr 16, 2018 at 19:00
  • try it.i will work Commented Apr 16, 2018 at 19:01
2

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

answered Apr 16, 2018 at 19:19
1
  • @DanieleRovatti You can accept answer if it's useful for you. So, other user can use this answer for solve query. Commented Apr 16, 2018 at 19:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.