Where is Magento 2 luma theme located?
The quick answer is in the
However, the long detailed answer raises up other questions as well. Beginner Magento 2 front-end developers might ask:
- What is the directory of themes other than Luma as well?
- Is the theme presented directly to the website visitor’s view in Magento 2?
In this article, we will answer 2 questions above, written in simple English so that beginner Magento front-end developers can easily understand.
Magento 2 theme location
In Magento 2, there are 2 default themes that are used for demonstration of a Magento website. They are Luma and Blank, with the formal being the child theme of the latter.
However, as Magento is an open-source e-commerce platform, various themes and extensions for Magento are developed by developers from the community. And the themes that are made by the community are not located in the same folder as Magento 2 default themes.
Indeed, Luma and Blank are located in
vendor/magento folder, while other themes are located in
app/design/frontend/[vendor_name]/[theme_name]. For example, our vendor name is Bss, and we make a theme named Thinnk. The location of our theme on the website would be
The reason for this is: Magento core are developed with scalability in mind. To keep this scalability, you should not edit any code inside the vendor folder according to Magento 2 official Dev Docs. Any development of a third-party module or continuation of developing current modules should be made in folder
app. In the theme scene, the theme files is in
Given that, if you want to upload a theme to your Magento 2 store, upload to these folders. However, if you want to restore your Luma or Blank in case of error, consider a smarter way other than downloading Luma.
Theme code location that the browser reads
The 3rd-party theme uploaded to
app/design/frontend/bss/thinnk is not presented directly to the website visitor’s view.
Instead, in Magento 2, the code of the themes and modules are generated to the folder pub using a deploy command:
php bin/magento setup:static-content:deploy
Having a separate pub folder increases the security of the website, makes use of cache and makes developing and installing new module hassle-free. This, once again, confirms the scalability of Magento.
The theme files that are rendered to pub can be accessed in
- For Luma theme in pub, theme files are located in
- For the theme in our preview example, theme files are located in
Magento 2 Luma theme location: In conclusion,
By now we hope that you have a decent understanding of Magento 2 Luma theme location, and the logic behind its folder architecture. Do you have any other question regarding Magento 2 theme location? Let us know in the comment below, and we would love to answer with our knowledge.
In case you want to learn more about Magento 2 theme by installing a new theme, free or premium, you can take a look at our themes category.