I have seen other tickets related to this, and have followed recommended steps. I have not been able to see new custom theme in admin section.
Here the steps I have done:
- I have created folder structure under 'Magento root'/vendor/myvendor/mytheme/
[![Folders structure][1]][1]
[1]: https://i.sstatic.net/VIooZ.jpg
.
- Then I have added file: 'theme_dir'/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>My Theme</title> <!-- your theme's name -->
<parent>Magento/blank</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>
.
- Then I have added file: 'theme_dir'/composer.json
{
"name": "myvendor/theme-frontend-mytheme",
"description": "N/A",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/theme-frontend-blank": "100.0.*",
"magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.1",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
} }
.
4. Then I have added file: 'theme_dir'/registration.php :
<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/myvendor/mytheme',
__DIR__ );
.
Then I updated ''/dev/tools/grunt/configs/themes.js - just below luma:
luma: {
area: 'frontend',
name: 'Magento/luma',
locale: 'en_US',
files: [
'css/styles-m',
'css/styles-l'
],
dsl: 'less'
},
my_theme: {
area: 'frontend',
name: 'myvendor/mytheme',
locale: 'en_US',
files: [
'css/styles-m',
'css/styles-l'
],
dsl: 'less'
},
.
Then deleted var from root
Then I flushed cache
Then I ran from CLI - in this step the new theme was not shown in logs:
magento setup:static-content:deploy
Then when I go to Admin/Content/Themes and I am not able to find new theme.