Plugin Base Guide
This guide outlines the typical development flow when creating a Shopware plugin, using the recommended static plugin approach. Core concepts apply to all plugin types. Not every plugin requires all steps.
Typical plugin development flow
- Create the plugin structure
- Install and activate the plugin
- Understand the plugin lifecycle
- Add plugin configuration
- Register services and use dependency injection
- Listen to events or decorate services
- Extend the platform (either or both): Storefront, Administration
- Add database migrations (if required)
- Add scheduled tasks or CLI commands (if required)
- Add dependencies: npm, Composer (if required)
- Write tests and configure CI
- Add diagnostics
Tooling
Most steps above can be generated instead of written by hand:
bin/console plugin:createscaffolds the plugin; see the Creating Plugins guide- The Shopware 6 Toolbox plugin generates plugins, subscribers, scheduled tasks, migrations, and Administration modules from PHPStorm, using file templates you can adapt to your own conventions
When a generator creates an optional feature, the files it produces are usually parts of one piece of framework wiring. For example, a generated controller can depend on both route configuration and service registration, while a scheduled task has separate task and handler roles. The focused guides explain those pieces in context; you do not normally need to reproduce the wiring manually.
Upgrade readiness
Design plugins so that:
- Migrations are idempotent
- Lifecycle logic is minimal and predictable
- Domain logic is encapsulated behind services
Upgrades are easier when the plugin surface area is small and well-structured.