Without a database configured, only the three
app:locale:* commands are registered. Everything else needs a connection.Application commands
app:import:seeds
Imports the starter templates and categories shipped with the release, from data/seeds.
Also available as
app:import:presets. See Starter content.
app:locale:extract
Scans sources and updates .po catalogs.
app:locale:translate
Fills in missing translations using an AI model.
Model and API credentials are read from options and the environment.
app:locale:build
Rebuilds the browser translation catalogs under the web root.
app:make:module
Scaffolds a new core module under src/. It asks for the module name interactively and refuses a name that already exists. This is for work on the application itself; plugins don’t use it.
app:generate-key
Writes a new APP_ENCRYPTION_KEY into .env. Stored credentials are encrypted with this key.
New installations get a key from the installer, so this is for installations that predate encryption. Without
--force, an existing key is left alone.
app:queue:work
Runs queued background jobs until it is stopped or reaches a limit.
The worker compares its user with the owner of
var/, which is taken to be the web server’s user. As another user it warns. As root it refuses to start unless --allow-root is passed, because root-owned cache and upload files can’t be changed by the web server afterwards. The worker exits with a non-zero status when its database connection breaks, so the process manager starts a fresh one. See Background jobs and cron.
app:schedule:run
Runs the scheduled tasks that are due, without working the queue. cron.php does this every minute; the command is for running it by hand. It exits with a non-zero status when a task fails, and -v prints each task.
app:update
Unpacks an update archive. It only backs up the files the installation keeps, extracts the release over the installation, and resets OPcache so the next request doesn’t run cached copies of the old files. It then starts app:update:finalize in a new PHP process, which loads only the new code.
If the finishing step fails, the files are unpacked but the update isn’t finished, and the command says so. Most installations update through the admin panel, which runs the same process. See How to update.
app:update:finalize
Finishes an update whose files are unpacked. It restores the files the update backed up, merging translation catalogs so the release’s new strings and the installation’s own translations are both kept, then runs database migrations and data migrations, reinstalls plugins, rebuilds translations, copies public files to a custom web root if one is configured, clears the cache, asks workers to restart, and records the new version.
app:update runs it for you. Run it by hand to finish an update that stopped halfway. When no update is waiting, it says so and changes nothing. Until an update is finished, cron.php does nothing and admin pages redirect to the update page, which finishes it too.
Doctrine commands
Migrations
ORM
DBAL
Running commands in production
- Run as the web server user, so cache and log files stay writable.
- Redirect output when running from cron; the console writes to standard output.
- Commands exit with a non-zero status on failure, so deployment scripts can check.
Plugins and commands
Plugins can’t register console commands: the command map inconfig/commands.php is static. Expose the action as an admin endpoint, or register a scheduled task instead. See Background jobs and cron and Data and persistence.