---
title: Creating a Theme | Shopware Community Hub
description: >-
  Learn how to create a custom theme in Shopware and understand the difference
  between a theme and a plugin.
canonical_url: 'https://hub.shopware.com/learn/unit/creating-a-theme'
---

# Creating a Theme

<LearningObjectives>

- Learn how to create a theme via CLI.
- Understand the difference between a theme and a plugin.

</LearningObjectives>

# Creating a Theme

Themes are an important part of Shopware. They allow you to customize the appearance of your shop and create a unique shopping experience for your customers.

Themes are basically plugins or apps on steroids. They can contain templates, styles, and assets that change the look and feel of your shop. In this unit, we will create a new theme and customize it to fit our needs.

<Callout title="Note" type="info">

Sometimes inventing the wheel is not necessary. Check out the [Shopware store](https://store.shopware.com/de/themes/) for existing themes that you can use as a base for your custom theme.

</Callout>

## Creating a Theme

There are two ways to approach a new theme in Shopware: via plugin or via app.

### Via Plugin

You can use the Shopware console command `theme:create` to generate a new theme skeleton. Run the following command in your shop's root directory:

```shell
bin/console theme:create AcademyTheme
```

This command will create a new theme called `AcademyTheme` in the `custom/plugins` directory. The theme will contain all the necessary files and directories to get you started.
You can also clone the [AcademyTheme](https://github.com/ShopwareAcademy/AcademyTheme) repository from the Shopware Academy GitHub account.

The difference to a "normal" plugin is that the `theme.json` file is created. This file is the central part of your theme and controls how templates, style, scripts, and assets are loaded. In the next learning unit, we will learn more about the `theme.json` file.

```shell
git clone git@github.com:ShopwareAcademy/AcademyTheme.git
```

```json
{
  "name": "AcademyTheme",
  "author": "Shopware AG",
  "description": {
    "en-GB": "Academy plugin theme"
  },
  "views": [
     "@Storefront",
     "@Plugins",
     "@AcademyTheme"
  ],
  "style": [
    "app/storefront/src/scss/overrides.scss",
    "@Storefront",
    "app/storefront/src/scss/base.scss"
  ],
  "script": [
    "@Storefront",
    "app/storefront/dist/storefront/js/academy-theme/academy-theme.js"
  ],
  "asset": [
    "@Storefront",
    "app/storefront/src/assets"
  ]
}
```

After creating the theme, it is not active yet. You need to **install and activate** it to make it available in the Storefront by the following command:

```bash
bin/console plugin:install AcademyTheme --activate
```

Only then your theme can be selected and compiled in the Storefront.

### Via App

Doing the same with an app is similar but needs a manual step to create the theme.json. You can use the Shopware console command `app:create` to generate a new app skeleton. Run the following command in your shop's root directory:

```shell
bin/console app:create AcademyTheme
```

All you have to do now is add your `theme.json` file to the `src/Resources` directory of your theme. This file will contain all the configurations for your theme. This is needed since there is no `app:theme:create` command available _yet_.

```json
{
  "name": "AcademyTheme",
  "author": "shopware AG",
  "description": {
    "en-GB": "Academy app theme"
  },
  "views": [
    "@Storefront",
    "@Plugins",
    "@AcademyTheme"
  ],
  "previewMedia": "app/storefront/dist/assets/defaultThemePreview.jpg",
  "style": [
    "app/storefront/src/scss/overrides.scss",
    "@Storefront",
    "@AcademyTheme"
  ]
}
```

### Pros and Cons: Which One Should I Use?

Both methods have their pros and cons, so choose the one that fits your needs best.

- Use the app method when your theme is only for style and storefront changes, and not for backend logic.
- Use the plugin method when you want to have full flexibility, including backend logic.

For more information, check out this article: [Plugin or App](https://developer.shopware.com/docs/guides/plugins/#at-a-glance).

## Conclusion

No matter whether you create a theme via plugin or app, you will end up with a theme that is ready to be customized.

You will find it in the administration under `Extensions > My extensions > Themes (tab)` or pass this [path](http://localhost:8000/admin#/sw/extension/my-extensions/listing/theme) to your browser and adjust it to your shop's domain.

![Creating a theme](assets/pluginAndAppTheme.jpg)

In the next units, we will check out how to change, compile and customize your theme.

## Summary

In this learning unit, you learned how to:

- Create a new theme in Shopware using the CLI (**`bin/console theme:create`**) or via an App (**`bin/console app:create`** and a manually added **`theme.json file`**).
- Understand the purpose of the theme.json as a central configuration for views, styles, scripts, and assets.
- Distinguish between a plugin-based and app-based theme, including their pros and cons.
- Locate and activate your theme in the Administration under **`Extensions > My extensions > Themes (tab)`**.

With this knowledge, you can now set up and register your own theme as the foundation for further customizations.
