General information about the Shopware 6 CLI
The Shopware Command Line Interface (CLI) can be called via Linux Shell. To execute Shopware CLI commands on a creoline server, a shell session via a secure shell (SSH) is required.
Prerequisites
- Terminal software for running a secure shell (SSH)
- SSH access via system user
- Shopware 6 installation
Terminal software recommendation:
Operating System | Software | Download |
---|---|---|
Windows | PuTTY | https://www.putty.org/ |
macOS | iTerm2 | https://iterm2.com/ |
Linux | Terminator | https://wiki.ubuntuusers.de/Terminator/ |
Establish SSH connection
Establish an SSH connection to your creoline server via 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, execute the command ls -al /var/www/vhosts/
.
Show available Shopware CLI commands
With the command bin/console
you can display 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. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-e, --env=ENV The Environment name. [default: "prod"]
--no-debug Switch off debug mode.
--profile Enables profiling (requires debug).
-v|vvv|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 local public folder of the extension. This command should run after assets:install so the assets are available in the public folder.
administration:delete-files-after-build Deletes all unnecessary files of the administration 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 app url changes
app:validate Validates an app
assets
assets:install Installs bundles web assets under a public web directory
bundle
bundle:dump [administration:dump:plugins|administration:dump:bundles] Dumps the bundle configuration for a plugin
cache
cache:clear Clear the cache
cache:clear:all Clear all caches/pools, invalidates expired tags, removes old system and twig cache directories
cache:clear:delayed Invalidates the delayed cache keys/tags
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
cache:watch:delayed Watches the delayed cache keys/tags
cart
cart:migrate Migrate carts from redis to database
changelog
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
config
config:dump-reference Dump the default configuration for an extension
customer
customer:delete-unused-guests Delete 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 migration for 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 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 List 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:scheduler List schedules and their recurring messages
debug:serializer Display serialization information for classes
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
dotenv
dotenv:dump Compile .env files to .env.local.php
es
es:admin:index Index the elasticsearch for the admin search
es:admin:mapping:update Update the Elasticsearch indices mapping
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:mapping:update Update the Elasticsearch indices mapping
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 given entity
framework:schema Dumps the schema of the given 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 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
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 is enabled.
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
media:update-path Iterates over the media and updates the path column.
messenger
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: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 Uninstall a plugin
plugin:update Updates a plugin
plugin:update:all Install 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 Help 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 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
scheduled-task
scheduled-task:list List all scheduled tasks
scheduled-task:register Registers all scheduled tasks
scheduled-task:run Runs scheduled tasks
scheduled-task:run-single Allows to run one single scheduled task regardless of its schedule.
secrets
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:reveal Reveal the value of a secret
secrets:set Set a secret in the vault
services
services:install Install 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 Login to the store
system
system:check Check the shopware application system health
system:config:get Get a config value
system:config:set Get a config value
system:configure-shop Configure store
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 if the system is installed and returns exit code 0 if Shopware is installed
system:setup Setup 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 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
translation
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.
user
user:change-password Change the password of a user
user:create Creates a new user
user:list List current users
Common commands
Cache
Empty cache:
bin/console cache:clear
Theme
Compile theme cache:
theme:compile
Sales-Channel
Show all sales channels:
sales-channel:list
Activate maintenance mode for a 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
Deactivate maintenance mode for a 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
User
Show user:
bin/console user:list
Create user:
bin/console user:create -email <email-address> <username>
Plugins / Extensions
Show plugins:
bin/console plugin:list
Activate plugin:
bin/console plugin:enable <plugin-name>
Deactivate plugin:
bin/console plugin:disable <plugin-name>