Command line commands
Commands
The Contao framework provides many commands via the script vendor/bin/contao-console (e.g. the well-known command vendor/bin/contao-console cache:clear).
Overview of the commands provided by Contao
# contao
contao:automator Runs automator tasks on the command line.
contao:backup:create Creates a new database backup.
contao:backup:list Lists the existing database backups.
contao:backup:restore Restores a database backup.
contao:crawl Crawls the Contao root pages with the desired subscribers.
contao:cron Runs all registered cron jobs on the command line.
contao:filesync Synchronizes the registered DBAFS with the virtual filesystem.
contao:install Installs the required Contao directories.
contao:install-web-dir Installs the files in the public directory.
contao:install:lock Locks the install tool.
contao:install:unlock Unlocks the install tool.
contao:maintenance-mode Changes the state of the system maintenance mode.
contao:migrate Executes migrations and updates the database schema.
contao:resize-images Resizes deferred images that have not been processed yet.
contao:setup Sets up a Contao Managed Edition. This command is run when executing the "contao-setup" binary.
contao:symlinks Symlinks the public resources into the public directory.
contao:user:create Creates a new Contao back end user.
contao:user:list Lists Contao back end users.
contao:user:password Changes the password of a Contao back end user.
contao:version Outputs the contao/core-bundle version (deprecated).Commands from the Symfony framework and the libraries required by Contao
# assets
assets:install Install bundle's web assets under a public directory
# cache
cache:clear Clear the cache
cache:pool:clear Clear cache pools
cache:pool:delete Delete an item from a cache pool
cache:pool:list List available cache pools
cache:pool:prune Prune cache pools
cache:warmup Warm up an empty cache
# config
config:dump-reference Dump the default configuration for an extension
# dbal
dbal:run-sql Executes arbitrary SQL directly from the command line.
# debug
debug:autowiring List classes/interfaces you can use for autowiring
debug:config Dump the current configuration for an extension
debug:container Display current services for an application
debug:contao-twig Displays the Contao template hierarchy.
debug:dca Dumps the DCA configuration for a table.
debug:dotenv Lists all dotenv files with variables and values
debug:event-dispatcher Display configured listeners for an application
debug:firewall Display information about your security firewall(s)
debug:fragments Displays the fragment controller configuration.
debug:pages Displays the page controller configuration.
debug:plugins Displays the Contao Manager plugin configurations.
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
# doctrine
doctrine:cache:clear-collection-region Clear a second-level cache collection region
doctrine:cache:clear-entity-region Clear a second-level cache entity region
doctrine:cache:clear-metadata Clear all metadata cache of the various cache drivers
doctrine:cache:clear-query Clear all query cache of the various cache drivers
doctrine:cache:clear-query-region Clear a second-level cache query region
doctrine:cache:clear-result Clear all result cache of the various cache drivers
doctrine:database:create Creates the configured database
doctrine:database:drop Drops the configured database
doctrine:ensure-production-settings Verify that Doctrine is properly configured for a production environment
doctrine:mapping:convert [orm:convert:mapping] Convert mapping information between supported formats
doctrine:mapping:import Imports mapping information from an existing database
doctrine:mapping:info
doctrine:query:dql Executes arbitrary DQL directly from the command line
doctrine:query:sql Executes arbitrary SQL directly from the command line.
doctrine:schema:create Executes (or dumps) the SQL needed to generate the database schema
doctrine:schema:drop Executes (or dumps) the SQL needed to drop the current database schema
doctrine:schema:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata
doctrine:schema:validate Validate the mapping files
# fos
fos:httpcache:clear Clear the HTTP cache.
fos:httpcache:invalidate:path Invalidate cached paths on all configured caching proxies
fos:httpcache:invalidate:regex Invalidate everything matching a regular expression on all configured caching proxies
fos:httpcache:invalidate:tag Invalidate cached content matching the specified tags on all configured caching proxies
fos:httpcache:refresh:path Refresh paths on all configured caching proxies
# 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
# router
router:match Help debug routes by simulating a path info match
# 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:set Set a secret in the vault
# security
security:encode-password Encode a password
security:hash-password Hash a user password
# translation
translation:extract [translation:update] 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.Additional commands from other extensions
# [pdir Maklermodul](https://github.com/pdir/maklermodul-bundle)
maklermodul
maklermodul:clear Deletes the property data folder.
maklermodul:import Imports properties from OpenImmo XML files.
maklermodul:index Creates indexes for list views.
maklermodul:sync Imports & indexes property data.# [Contao Utils Bundle](https://github.com/heimrichhannot/contao-utils-bundle)
huh
huh:utils:create-image-size-items Creates image size items for a given image size entity. Image size entities with existing image size items will be skipped.