Magento 2 – How to Rename Theme Folder

magento2theme

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.

Best Answer

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

Related Topic