You can create shopware 6 theme using command or manually. First, we will explore how we can create a theme using the command.
Follow below steps to create theme using command
1. Connect ssh using terminal(Mac) or putty(windows)
2. Go to shopware 6 root directory
3. Now run the below command.
php bin/console theme:create Bay20theme'. 'Bay20theme'
‘Bay20theme’ is theme name. You can use your theme name accordingly.
4. Once the theme is created then it will show you the location where theme files are stored like ‘/var/www/html/custom/plugins/Bay20theme‘. In shopware all themes are created in the plugin folder.
5. Now install your theme plugin by running the below command.
php bin/console plugin:install Bay20theme
6. Once the above command is executed you can see your theme plugin by running the below command.
php bin/console plugin:list
7. Now activate ‘Bay20theme‘ theme plugin by running the below command.
php bin/console plugin:activate Bay20theme
8. Now you need to change the theme for the active channel for frontend from admin panel. First logged into admin panel and go to sales channel section and click on ‘storefront’
9. Now click now ‘theme’ tab and click on ‘change theme’ button. It will show a popup with newly created theme ‘Bay20theme’. You need to select the theme and save the changes.
10. Once theme change is applied you can add your changes and customize your theme.
Note: If your changes are not visible on the frontend make sure to clear cache and compile theme by running the below commands.
php bin/console cache:clear
php bin/console theme:compile