I am trying to change the Magento 2.1.0
theme folder name to my companyname. But I cannot find any help online.
Please help.
Here is my solution to change theme name:
1) Change folder name:
app/design/frontend/{your-vendor}/{folder-theme}/
2) Change path name in registration.php file:
app/design/frontend/{your-vendor}/{folder-theme}/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/{your-vendor}/{folder-theme}',
__DIR__
);
3) Change path name in theme.xml file:
app/design/frontend/{your-vendor}/{folder-theme}/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>{theme-name}</title>
<parent>Magento/luma</parent>
</theme>
NOTE: After changing you have to run this conmand:
php bin/magento setup:static-content:deploy
First,you need to check the magento blog http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-create.html
There are few step,you need to do for this changes:
Change folder name from
app/design/frontend/<ThemeVendorname>/<YourCurrentTHeme>
to
app/design/frontend/[YorComapanyname]/[YourThemeName]
As you have changing folder name so, you need to change some files
registration.php -> app/design/frontend/[YorComapanyname]/[YourThemeName]
Change:
frontend/<ThemeVendorname>/<YourCurrentTHeme>
to
frontend/[YorComapanyname]/[YourThemeName]
Also, at composer.json
file ,you can change theme name "name": "magento/[Current_theme_value]"
to You wish
For the renaming theme, you have to create your own then and copy paste default theme content in your theme.
1. Create Theme Directory
app/design/frontend/<vendor>/<themename>
2. Declare your theme
app/design/frontend/vendor/themename/composer.json
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>m2-theme</title>
<parent>Magento/Luma</parent><!--here you can add your parent theme-->
<media>
<preview_image>media/m2-theme-image.jpg</preview_image> <!-- add image path {optional} -->
</media>
</theme>
3. Make Your Theme a Composer package
app/design/frontend/vendor/themename/composer.json
{
"name": "<vendor>/<themename>", //Change with your vendor and theme
"description": "N/A",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"<vendor>/<themename>": "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.Add registration.php to register your theme
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/<vendor>/<themename>',
__DIR__
);
Now go to Stores > Configuration > Design in your admin section. and select your theme
NOTE: don't forget to recompile and deploy
Just go to your theme
app/design/frontend/Magento/theme
and here you see theme.xml file.
Just change Title Name as you want as a theme name and it's displayed in backend admin theme name.
Follow above step