Shopware offers the possibility to execute some functions via the console. The so-called "CLI" commands can be executed outside of script limitations (example: script runtime of the server) and are therefore recommended when processing large amounts of data. These commands are executed directly in the server's console, e.g. an SSH connection can be used for this purpose. Under Windows, for example, the programme "PuTTY", which is available free of charge, can be used for this; MacOS and Linux users can establish an SSH connection directly in the terminal.
After you have established the SSH connection, change to the Shopware installation directory.
There you can execute the commands as follows
php bin/console <command>
In this article we will explain the most important commands in more detail.
You can obtain a list of all commands by entering
php bin/console list
You can access the general help page for the CLI commands via
php bin/console --help
to call up the command. There is also a separate help page for most commands. You can call this up via
php bin/console <command> --help
Command | Description |
---|---|
about | Provides general information about the Shopware installation |
completion | Dump the shell completion script |
help | Shows help information, can also be used in connection with another command. To do this, add a "--" before the help. See also in the first section General. |
list | Lists all available commands |
Command | Description |
---|---|
administration:delete-files-after-build | Deletes all uneccessary files of the administration after the build process. |
Command | Description |
---|---|
app:activate | Activates an app |
app:create | Creates an app skeleton |
app:deactivate | Deactivates an app |
app:install | Installs an app |
app:refresh | [app:update] Refreshes an app |
app:uninstall | Uninstalls an app |
app:url-change:resolve | Resolves app url changes |
app:validate | Validates an app |
Command | Description |
---|---|
assets:install | Installs bundles web assets under a public web directory |
Command | Description |
---|---|
bundle:dump | [administration:dump:plugins|administration:dump:bundles] Dumps the bundle configuration for a plugin |
Command | Description |
---|---|
cache:clear | Clear the cache |
cache:pool:clear | Clear cache pools |
cache:pool:delete | Delete an item from a cache pool |
cache:pool:invalidate-tags | Invalidate cache tags for all or a specific pool |
cache:pool:list | List available cache pools |
cache:pool:prune | Prune cache pools |
cache:warmup | Warm up an empty cache |
Command | Description |
---|---|
cart:migrate | Migrate carts from redis to database |
Command | Description |
---|---|
changelog:change | Changes the changelog of a release |
changelog:check | Checks the changelog for errors |
changelog:create | Creates a changelog file |
changelog:release | Creates a new changelog release |
To use the following CLI commands, the Commercial Plugin must be installed and active.
Command | Description |
---|---|
commercial:feature:disable | Disable a feature which is included in your plan |
commercial:feature:enable | Enable a feature which is included in your plan |
commercial:feature:list | List features included in your plan and their status |
commercial:license:set | Set commercial licence host & key |
commercial:license:update | Update commercial licence key |
commercial:report-turnover | Reports the turnover of the specified timeframe |
Command | Description |
---|---|
config:dump-reference | Dump the default configuration for an extension |
Command | Description |
---|---|
customer:delete-unused-guests | Delete unused guest customers |
Command | Description |
---|---|
dal:create:entities | Creates the entity classes |
dal:create:hydrators | Creates the hydrator classes |
dal:create:schema | Creates the database schema |
dal:refresh:index | Refreshes the index for a given entity |
dal:validate | Validates the DAL definitions |
Command | Description |
---|---|
database:clean-personal-data | Cleans personal data from the database |
database:create-migration | Creates a new migration file |
database:migrate | Executes all migrations |
database:migrate-destructive | Executes all migrations |
database:refresh-migration | Refreshes the migration state |
Command | Description |
---|---|
debug:autowiring | List classes/interfaces you can use for autowiring |
debug:business-events | Dumps all business events |
debug:config | Dump the current configuration for an extension |
debug:container | Display current services for an application |
debug:dotenv | Lists all dotenv files with variables and values |
debug:event-dispatcher | Display configured listeners for an application |
debug:messenger | List messages you can dispatch using the message buses |
debug:router | Display current routes for an application |
debug:translation | Display translation messages information |
debug:twig | Show a list of twig functions, filters, globals and tests |
debug:validator | Display validation constraints for classes |
Command | Description |
---|---|
docs:app-system-events | Dump the app events |
docs:generate-scripts-reference | Generate the script reference |
Command | Description |
---|---|
dotenv:dump | Compiles .env files to .env.local.php |
Command | Description |
---|---|
es:admin:index | Index the elasticsearch for the admin search |
es:admin:reset | Reset Admin Elasticsearch indexing |
es:admin:test | Allows you to test the admin search index |
es:create:alias | Create the elasticsearch alias |
es:index | Index all entities into elasticsearch |
es:index:cleanup | Clean outdated indices |
es:reset | Reset the elasticsearch index |
es:status | Show the status of the elasticsearch index |
es:test:analyzer | Test the elasticsearch analyzer |
Command | Description |
---|---|
feature:dump | [administration:dump:features|administration:dump:features] Dumps all features |
Command | Description |
---|---|
framework:demodata | Generates demo data |
framework:dump:class:schema | Dumps the schema of the given entity |
framework:schema | Dumps the schema of the given entity |
Command | Description |
---|---|
http:cache:warm:up | Warm up the http cache |
Command | Description |
---|---|
import:entity | Import entities from a csv file |
Command | Description |
---|---|
import-export:delete-expired | Deletes expired files |
Command | Description |
---|---|
lint:container | Ensure that arguments injected into services match type declarations |
lint:twig | Lint a Twig template and outputs encountered errors |
lint:xliff | Lint an XLIFF file and outputs encountered errors |
lint:yaml | Lint a YAML file and outputs encountered errors |
Command | Description |
---|---|
mailer:test | Test Mailer transports by sending an email |
Command | Description |
---|---|
media:delete-unused | Deletes all media files which are not used in any entity |
media:generate-media-types | Generates media types for all media files |
media:generate-thumbnails | Generates thumbnails for all media files |
Command | Description |
---|---|
messenger:consume | Consume messages |
messenger:failed:remove | Remove given messages from the failure transport |
messenger:failed:retry | Retry one or more messages from the failure transport |
messenger:failed:show | Show one or more messages from the failure transport |
messenger:setup-transports | Prepare the required infrastructure for the transport |
messenger:status | Show the message count for one or more transports |
messenger:stop-workers | Stop workers after their current message |
Command | Description |
---|---|
migration:migrate basicSettings | Migrate basic settings and categories |
migration:migrate cms | Migrate CMS layouts |
migration:migrate customersOrders | Migrate all customers, orders and documents |
migration:migrate media | Migrate all media and folders |
migration:migrate newsletterRecipient | Migrate newsletter recipients |
migration:migrate products | Migrate all product data and assiciated entities (associated entities from "media" included) |
migration:migrate productReviews | Migrate product reviews |
migration:migrate promotions | Migrate promotions |
migration:migrate seoUrls | Migrate SEO URLs |
migration:migrate customerWishlists | Migrate wishlists |
In version 13.0.0 of the Migration Assistant, the CLI commands were adjusted. For more details on this and about migrating large data sets via the console, you can learn more here.
Command | Description |
---|---|
number-range:migrate | Migrate the increment storage of a number range |
Command | Description |
---|---|
plugin:activate | Activate a plugin |
plugin:create | Creates a new plugin |
plugin:deactivate | Deactivates a plugin |
plugin:install | Installs a plugin |
plugin:list | Lists all plugins |
plugin:refresh | Refreshes the plugin list |
plugin:uninstall | Uninstall a plugin |
plugin:update | Updates a plugin |
plugin:zip-import | Imports a plugin from a zip file |
Command | Description |
---|---|
product-export:generate | Generates a product export file |
Command | Description |
---|---|
router:match | Help debug routes by simulating a path info match |
Command | Description |
---|---|
s3:set-visibility | Sets the visibility of all files in the s3 filesystem to public |
Command | Description |
---|---|
sales-channel:create | Creates a new sales channel |
sales-channel:create:storefront | Creates a new storefront sales channel |
sales-channel:list | Lists all sales channels |
sales-channel:maintenance:disable | Disable maintenance mode for a sales channel |
sales-channel:maintenance:enable | Enable maintenance mode for a sales channel |
sales-channel:update:domain | Updates a sales channel domain |
Command | Description |
---|---|
scheduled-task:register | Registers all scheduled tasks |
scheduled-task:run | Runs scheduled tasks |
Command | Description |
---|---|
secrets:decrypt-to-local | Decrypt all secrets and stores them in the local vault |
secrets:encrypt-from-local | Encrypt all local secrets to the vault |
secrets:generate-keys | Generate new encryption keys |
secrets:list | List all secrets |
secrets:remove | Remove a secret from the vault |
secrets:set | Set a secret in the vault |
Command | Description |
---|---|
sitemap:generate | Generates sitemap files |
Command | Description |
---|---|
snippets:validate | Validates snippets |
Command | Description |
---|---|
state-machine:dump | Dumps a state machine to a graphviz file |
Command | Description |
---|---|
store:download | Downloads a plugin from the store |
store:login | Login to the store |
Command | Description |
---|---|
sync:composer:version | Syncs the composer version with the shopware version |
Command | Description |
---|---|
system:config:get | Get a config value |
system:config:set | Set a config value |
system:configure-shop | Configure shop |
system:generate-app-secret | Generates a new app secret |
system:generate-jwt-secret | Generates a new JWT secret |
system:install | Installs the Shopware 6 system |
system:setup | Setup the system |
system:update:finish | Finishes the update process |
system:update:prepare | Prepares the update process |
Command | Description |
---|---|
theme:change | Change the active theme for a sales channel |
theme:compile | Compile the theme |
theme:create | Create a new theme |
theme:dump | Dump the theme configuration |
theme:prepare-icons | Prepare the theme icons |
theme:refresh | Refresh the theme configuration |
Command | Description |
---|---|
translation:extract | Extract missing translations keys from code to translation files. |
translation:pull | Pull translations from a given provider. |
translation:push | Push translations to a given provider. |
Command | Description |
---|---|
user:change-password | Change the password of a user |
user:create | Creates a new user |