:::: MENU ::::

Magento 2 deploy static content theme

Magento 2 deploy static content theme

Today we talk about how to use command line interface to do Magento 2 deploy static content theme.Doing the static content deployment is quite a headache. So today i will tell how to deploy content smartly. Magento 2 give option to deploy language example en_US, deploy area example frontend or adminhtml also the deploy the theme example blank or luma. Now we separate these with frontend and backend. This tutorial include the single theme deploy in magento 2, area base deployment example frontend or adminhtml and local base content deploy. Here is shortcut of adding the language area and theme.
-l = language
-a = area
-t = theme

Frontend theme deployment

By default you can use below command to deploy the static content. This is deploy static content for add the languages.

php bin/magento  setup:static-content:deploy

Now we add language filter so it deploy only my specific language example en_Us

php bin/magento  setup:static-content:deploy  en_US

After adding language filter we add the area specific filter so it deploy only my area language example frontend.

php bin/magento  setup:static-content:deploy  en_US -a frontend

After adding area filter we add the theme filter so it deploy only my theme example luma.

php bin/magento  setup:static-content:deploy  en_US -a frontend -t Magento/luma

Bakcend theme deployment

Using php bin/magento setup:static-content:deploy en_US after adding language filter we add the area specific filter so it deploy only my area language example backend. Now it will deploy the backend content only.

php bin/magento  setup:static-content:deploy  en_US -a adminhtml

After adding area filter we add the theme filter so it deploy only my theme example backend.

php bin/magento  setup:static-content:deploy  en_US -a adminhtml-t Magento/backend
Author: Qaisar Satti
Category: Magento 2
Last Modified: July 12, 2018


So, what do you think ?