WAMP environment.
Magento installation is ok, I can see frontend and backend with no issues.
However I noticed there is no theme folders, blank and luma, where they were supposed to be.
Blank and luma folders are only found at pub/static/frontend/Magento folder but not in app/design/frontend/Magento.
I found this issue while trying to create a new theme which will inherit from blank (thus noticing there is no blank or luma folder)
That is expected in the composer based Magento2 application or if you got the zip. All languages, modules, themes will be under vendor/magento. So, Blank theme can be found at vendor/magento/theme-frontend-blank
@mazhalai New theme files should be placed also under the vendor directory? The frontend developer guide says new theme folders should be placed under app/design/frontend/
Yes, when developing a new theme, as a frontend developer, you should place your new themes in the app/design/ folder. But when this theme will be used by others, they will require it via composer, and then it will be in the vendor folder.
@mazhalai My new theme will inherit from blank. The theme.xml file for the new theme includes a reference for the parent theme:
Since that Magento/blank does not exist, what should I do?
We are still thinking about whether to make this policy, but recommendation at least for now is to put files local to a project (or during development) under app/code (modules) or app/design (themes). If someone download/installs the module/theme via Composer (e.g. after obtaining from the Marketplace when online), Composer will put it under the 'vendor' directory for you. So 'vendor' means "I did not write this". The directory might be a candidate for a .gitignore file.
Regarding your latest comment, was there XML markup? It seems to have got munged. Magento/blank certainly exists in a standard install, so not sure what you mean by that exactly - but maybe I misunderstood.
@alankent From the frontend developer guide:
"Add or copy from an existing theme.xml to your theme directory app/design/frontend/
I copied the file from vendor/Magento/theme-frontend-blank to app/design/frontend/MYtheme/MYtheme, then I want to reference the parent theme, as the guide says:
< parent > Magento/blank < / parent >
but the Magento/blank folder does not exist under app/frontend/design
Simple answer: Magento currently knows to look in vendor _and_ under app/design for themes.
Long answer (if you want details): In GitHub, it does exist under app/design/frontend (https://github.com/magento/magento2/tree/develop/app/design/frontend/Magento/blank). When installing via Composer (as recommended for production sites or anyone else wanting stability), Composer puts it under the vendor directory. This is standard Composer behavior.
So "vendor/Magento/theme-frontend-blank" is the root directory of the Composer package holding the blank theme. Magento will find the theme over in that directory as well. (This is one of the reasons there is a "registration.php" file in themes (and modules) now. It tells Magento where the theme sits on disk.)
So while developing a theme, or if theme is for a local project (not intended to be used across multiple projects), you put it under app/design. If you decide to sell it on Magento Marketplace for example, there are instructions to bundle it (basically ZIP the directory) and upload to the Marketplace. Other users that download it will have it put in their 'vendor' directory automatically by Composer. The 'vendor' directory holds all code that you did not write.
< parent > Magento/blank < / parent > is not path, but name of the parent theme as <vendor_name>/<theme_name>
@alankent I appreciate the long answer. For testing I just applied the new theme with no modifications at all (it should display the same as the blank theme) however there are no images or css. The browser is looking for images and css in pub/static/frontend/Mytheme/mytheme/en_US/... which don't exist. Those files should be inherited from blank??

Create a directory for the theme under app/design/frontend/
Add a declaration file theme.xml and optionally create etc directory and create a file named view.xml to the theme directory.
Add a composer.json file.
Add registration.php.
Create directories for CSS, JavaScript, images, and fonts.
Configure your theme in the Admin panel.
@lgarridoj please run bin/magento setup:static-content:deploy from command line.
@mazhalai I had run already that command a after installation. I run it again and now my new theme is applied. That command needs to be run every time when creating a new theme?
@mazhalai That command created all the necessary files under pub/static/frontend/Mytheme/mytheme but they are the same files under pub/static/frontend/Magento/blank. Since Mytheme inherits from blank, why do magento need the same files in both folders? The purpose of inheriting of themes is supposed to solve the problem of having the same files on both folders
Hi @lgarridoj ,
pub/static is a temporary location for the files. It's, kind of, a cache or "compiled" version.
Magento application has fallback mechanism that allows inheritance. But it requires search through files, which takes time. For optimization purposes, application denormalizes paths to files. If a file belongs to blank theme and the theme is inherited by mytheme, the file is duplicated in mytheme folder. It allows to access the files directly using web-server and not involving Magento application logic. So it's more optimal for accessing the files.
Running the tool should be necessary only in production mode. In developer more the files should be searched via fallback, so any changes are always reflected in the result. For optimization purposes, some files may have symlinks in pub/static, so access to them is optimized and, in the same time, any changes are still applied instantly (it's not applicable for some files).
If the application doesn't work correctly in non-production mode with cleaned pub/static folder (leave .htaccess), most likely, something's wrong with url rewrites.
I dont think this topic is closed, the question of @lgarridoj isnt answered, i got the same issue, the theme isnt getting the inheritance and the theme looks empty, i did all the steps in the devdocs documentation and try two different paths of parent theme, the vendor one and the default Magento/. Can you at least update the documentation with this issues?
@ezequielalba please refrain from commenting on closed issues, it would be better to start a new thread. Can you post the theme.xml of your custom theme? This example shows the recommended way to inherit themes.
@mazhalai hi!, i made it work, but only by creating the composer.json file,i didnt create it before because it says it is optional, but i think is required. Dont know if i am correct.
This is my XML
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>IDS Theme</title> <!-- your theme's name -->
<parent>Magento/luma</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
<media>
<preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
</media>
</theme>
But i dont have the blocks or the catalog that shows on luma. Something i missed?
@ezequielalba did you register your theme
Yes! and the etc/view.xml file too, just in case, the theme now shows, but it shows nothing of the luma theme, instead it shows the blank theme, with the difference of the logo.svg i made. @mazhalai
Please refer to this thread. "we do no recommend inheriting from the Luma theme" https://github.com/magento/magento2/issues/1929#issuecomment-142679660
got it, thank you! @mazhalai
Thanks for this
@mazhalai please run bin/magento setup:static-content:deploy from command line.
Thanks for this
@mazhalai I have a query regarding integrating a new theme with new neader and footer.
Where do we place out header and footer html and how do we call it in the xml files and what makes it happen to appear in frontend.
I have started working on magento 2 from last 3 weeks and am very much confused with the folder structure of theme
@gaganzpr Please do not comment on closed issues. Also, the GitHub issue tracker is intended for technical issues only, not questions and technical assistance. Please refer to the Community Forums or Magento Stack Exchange site for technical questions. In your case, the programming questions forum is likely the most appropriate.