General Information About the Shopware 6 CLI

The Shopware Command Line Interface (CLI) can be accessed via the Linux shell. To execute Shopware CLI commands on a creoline server, a shell session via Secure Shell (SSH) is required.



Prerequisites

  • Terminal software for running Secure Shell (SSH)
  • SSH access via a system user
  • Shopware 6 installation


Recommended terminal software:

Operating System Software Download
Windows PuTTY https://www.putty.org/
macOS iTerm2 https://iterm2.com/
Linux Terminator https://wiki.ubuntuusers.de/Terminator/



Establish an SSH Connection

Establish an SSH connection to your creoline server using the terminal software. Then navigate to the Shopware 6 directory.


Example:

cd /var/www/vhosts/shopware.creoline-demo.com/httpdocs


Tip: To display all available domains, run the command ls -al /var/www/vhosts/.



View Available Shopware CLI Commands

You can use the bin/console command to view all available CLI commands.


Example:

$ bin/console

Shopware 6.6.8.2 (env: prod, debug: true)

Usage:
  command [options] [arguments]

Options:
  -h, --help Display help for the given command. If no command is specified, display help for the list command
  -q, --quiet Do not display any messages
  -V, --version Display this application’s version
 --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive questions
  -e, --env=ENV The environment name. [default: "prod"]
 --no-debug Disable debug mode.
      --profile Enables profiling (requires debug mode).
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output, and 3 for debug

Available commands:
  about Display information about the current project
  completion Dump the shell completion script
  help Display help for a command
  list List commands
 administration
  administration:delete-extension-local-public-files  Deletes all files in the extension’s local public folder. This command should be run after `assets:install` so that the assets are available in the public folder.
  administration:delete-files-after-build Deletes all unnecessary administration files after the build process.
 app
  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 changes to the app’s URL
  app:validate Validates an app
 assets
  assets:install Installs a bundle’s web assets in a public web directory
 bundle
  bundle:dump [administration:dump:plugins|administration:dump:bundles] Dumps the bundle configuration for a plugin
 cache
  cache:clear Clears the cache
  cache:clear:all Clears all caches/pools, invalidates expired tags, and removes old system and Twig cache directories
  cache:clear:delayed Invalidates the delayed cache keys/tags
  cache:pool:clear Clears cache pools
  cache:pool:delete Deletes an item from a cache pool
  cache:pool:invalidate-tags Invalidates 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
  cache:watch:delayed Watches the delayed cache keys/tags
 cart
  cart:migrate Migrate carts from Redis to the database
 changelog
  changelog:change Changes the changelog for a release
  changelog:check Checks the changelog for errors
  changelog:create Creates a changelog file
  changelog:release Creates a new changelog release
 config
  config:dump-reference Dumps the default configuration for an extension
 customer
  customer:delete-unused-guests Deletes unused guest customers
 DAL
  dal:create:entities Creates the entity classes
  dal:create:hydrators Creates the hydrator classes
  dal:create:schema Creates the database schema
  dal:migration:create Creates a migration for the entity schema
  dal:refresh:index Refreshes the index for a given entity
  dal:validate Validates the DAL definitions
 database
  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
 debug
  debug:autowiring Lists classes and interfaces you can use for autowiring
  debug:business-events Dumps all business events
  debug:config Dumps the current configuration for an extension
  debug:container Displays current services for an application
  debug:dotenv Lists all dotenv files with variables and values
  debug:event-dispatcher Displays configured listeners for an application
  debug:messenger Lists messages you can dispatch using the message buses
  debug:router Displays current routes for an application
  debug:scheduler Lists schedules and their recurring messages
  debug:serializer Displays serialization information for classes
  debug:translation Displays translation message information
  debug:twig Show a list of Twig functions, filters, globals, and tests
  debug:validator Display validation constraints for classes
 dotenv
  dotenv:dump Compile .env files to .env.local.php
 es
  es:admin:index Index Elasticsearch for the admin search
  es:admin:mapping:update Update the Elasticsearch index mappings
  es:admin:reset Reset the admin Elasticsearch indexing
  es:admin:test Allows you to test the admin search index
  es:create:alias Create an Elasticsearch alias
  es:index Index all entities into Elasticsearch
  es:index:cleanup Clean up outdated indices
  es:mapping:update Update the Elasticsearch index mappings
  es:reset Reset the Elasticsearch index
  es:status Show the status of the Elasticsearch index
  es:test:analyzer Test the Elasticsearch analyzer
 feature
  feature:disable Disable feature flags
  feature:dump [administration:dump:features|administration:dump:features] Dumps all features
  feature:enable Enable feature flags
  feature:list List all registered features
 framework
  framework:demodata Generates demo data
  framework:dump:class:schema Dumps the schema of the specified entity
  framework:schema Dumps the schema of the specified entity
 import
  import:entity Import entities from a CSV file
 import-export
  import-export:delete-expired Deletes expired files
 integration
  integration:create Create an integration and dump the key and secret
 lint
  lint:container Ensures that arguments injected into services match type declarations
  lint:twig Lints a Twig template and outputs any errors encountered
  lint:xliff Lints an XLIFF file and outputs any errors encountered
  lint:yaml Validate a YAML file and output any errors encountered
 mailer
  mailer:test Test Mailer transports by sending an email
 make
  make:plugin:admin-module
  make:plugin:command
  make:plugin:composer
  make:plugin:config
  make:plugin:custom-fieldset
  make:plugin:entity
  make:plugin:event-subscriber
  make:plugin:javascript-plugin
  make:plugin:plugin-class
  make:plugin:scheduled-task
  make:plugin:store-api-route
  make:plugin:storefront-controller
  make:plugin:tests
 media
  media:delete-local-thumbnails Deletes all physical media thumbnails when remote thumbnails are enabled.
  media:delete-unused Deletes all media files that 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
  media:update-path Iterates over the media and updates the path column.
 messenger
  messenger:consume Consumes messages
  messenger:failed:remove Removes specified 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:stats Show the message count for one or more transports
  messenger:stop-workers Stop workers after their current message
 number-range
  number-range:migrate Migrate the increment storage of a number range
 plugin
  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 Uninstalls a plugin
  plugin:update Updates a plugin
  plugin:update:all Installs all available plugin updates
  plugin:zip-import Imports a plugin from a zip file
 product-export
  product-export:generate Generates a product export file
 router
  router:match Helps debug routes by simulating a path info match
 s3
  s3:set-visibility Sets the visibility of all files in the S3 filesystem to public
 sales-channel
  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 Disables maintenance mode for a sales channel
  sales-channel:maintenance:enable Enables maintenance mode for a sales channel
  sales-channel:update:domain Updates a sales channel domain
 scheduled-task
  scheduled-task:list Lists all scheduled tasks
  scheduled-task:register Registers all scheduled tasks
  scheduled-task:run Runs scheduled tasks
  scheduled-task:run-single Allows you to run a single scheduled task regardless of its schedule.
 secrets
  secrets:decrypt-to-local Decrypts all secrets and stores them in the local vault
  secrets:encrypt-from-local Encrypts all local secrets and stores them in the vault
  secrets:generate-keys Generates new encryption keys
  secrets:list Lists all secrets
  secrets:remove Removes a secret from the vault
  secrets:reveal Reveals the value of a secret
  secrets:set Sets a secret in the vault
 services
  services:install Installs all services
 sitemap
  sitemap:generate Generates sitemap files
 snippets
  snippets:validate Validates snippets
 state-machine
  state-machine:dump Dumps a state machine to a Graphviz file
 store
  store:download Downloads a plugin from the store
  store:login Logs in to the store
 system
  system:check Check the Shopware application system health
  system:config:get Get a configuration value
  system:config:set Set a configuration value
  system:configure-shop Configure the 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:is-installed Checks whether the system is installed and returns exit code 0 if Shopware is installed
  system:setup Sets up the system
  system:setup:staging Installs the Shopware 6 system in staging mode
  system:update:finish Finishes the update process
  system:update:prepare Prepares the update process
 theme
  theme:change Change the active theme for a sales channel
  theme:compile Compiles the theme
  theme:create Creates a new theme
  theme:dump Dumps the theme configuration
  theme:prepare-icons Prepares the theme icons
  theme:refresh Refreshes the theme configuration
 translation
  translation:extract Extract missing translation keys from code to translation files
  translation:pull Pull translations from a given provider.
  translation:push Push translations to a given provider.
 user
  user:change-password Change a user’s password
  user:create Create a new user
  user:list List current users



Common Commands


Cache

Clear the cache:

bin/console cache:clear


Theme

Compile the theme cache:

theme:compile


Sales Channel

List all sales channels:

sales-channel:list


Enable maintenance mode for one sales channel:

bin/console sales-channel:maintenance:enable <sales-channel-id>


Enable maintenance mode for all sales channels:

bin/console sales-channel:maintenance:enable --all


Disable maintenance mode for one sales channel:

bin/console sales-channel:maintenance:disable <sales-channel-id>


Disable maintenance mode for all sales channels:

bin/console sales-channel:maintenance:disable --all


Users

List users:

bin/console user:list


Create a user:

bin/console user:create --email <email-address> <username>


Plugins / Extensions

List plugins:

bin/console plugin:list


Enable a plugin:

bin/console plugin:enable <plugin-name>


Disable a plugin:

bin/console plugin:disable <plugin-name>