Console commands
php bin/console list # in DDEV: ddev console listdeploy
Optimizes the autoloader, rebuilds every cache, publishes post files and refreshes the web server's Opcache. See Deploying for the options and Deploy steps for the steps.
php bin/console deploy [--list-steps] [--skip=a,b] [--assets] [--opcache=cachetool|reload|none]
[--fcgi=…] [--cachetool=…] [--reload-cmd=…] [--composer=…] [--no-dev]
[--skip-composer] [--skip-opcache]Exit codes: 0 deployed, 1 a step failed, 2 invalid options (nothing was changed).
cache:clear
Deletes everything in var/cache (keeping .gitkeep) and the post and page files published to public/media/blog/ and public/media/pages/. If a deploy left the Composer autoloader authoritative, it also runs composer dump-autoload, so new classes are found again. Run it when you go back to development after a deploy.
| Option | Default | |
|---|---|---|
--composer | composer | Composer binary |
cdn:purge
Drops pages from the CDN's cache (CDN caching), with the purger set by CDN_PURGE or a package.
php bin/console cdn:purge blog/my-post /it/chi-siamo # paths on this site (APP_URL)
php bin/console cdn:purge https://example.com/blog/my-post # full URLs
php bin/console cdn:purge --all # everythingExit codes: 0 purged, 1 the CDN refused or no purge is set up (the message says why), 2 no URLs and no --all, or both.
Your commands
Every command class in src/Command/ is registered automatically. See Console commands.