List of TYPO3 console commands
By default TYPO3 ships the listed console commands, depending on which system extensions are installed.
Third party extensions can define custom console commands.
The extension EXT:typo3_console ships many commands to execute TYPO3 actions, which otherwise would only be accessible via the TYPO3 backend.
This page assumes that the code is run on a Composer based installation with default binaries location. Here you can read how to run them in general and on legacy installations: Run a command from the command line.
List all TYPO3 console commands
Command | Description |
---|---|
global |
|
completion |
Dump the shell completion script |
help |
Display help for a command |
list |
List commands |
setup |
Setup TYPO3 via CLI using environment variables, CLI options or interactive |
backend |
|
backend:lock |
Lock the TYPO3 Backend |
backend:resetpassword |
Trigger a password reset for a backend user |
backend:unlock |
Unlock the TYPO3 Backend |
backend:user:create |
Create a backend user |
cache |
|
cache:flush |
Flush TYPO3 caches. |
cache:warmup |
Warmup TYPO3 caches. |
cleanup |
|
cleanup:deletedrecords |
Permanently deletes all records marked as "deleted" in the database. |
cleanup:flexforms |
Updates all database records which have a FlexForm field and the XML data does not match the chosen datastructure. |
cleanup:localprocessedfiles |
Delete processed files and their database records. |
cleanup:missingrelations |
Find all record references pointing to a non-existing record |
cleanup:orphanrecords |
Find and delete records that have lost their connection with the page tree. |
cleanup:previewlinks |
Clean up expired preview links from shared workspace previews. |
cleanup:versions |
Find all versioned records and possibly cleans up invalid records in the database. |
extension |
|
extension:list |
Shows the list of extensions available to the system |
extension:setup |
Set up extensions |
impexp |
|
impexp:export |
Exports a T3D / XML file with content of a page tree |
impexp:import |
Imports a T3D / XML file with content into a page tree |
language |
|
language:update |
Update the language files of all activated extensions |
mailer |
|
mailer:spool:send |
Sends emails from the spool |
messenger |
|
messenger:consume |
Consume messages |
redirects |
|
redirects:checkintegrity |
Check integrity of redirects |
redirects:cleanup |
Cleanup old redirects periodically for given constraints like days, hit count or domains. |
referenceindex |
|
referenceindex:update |
Update the reference index of TYPO3 |
scheduler |
|
scheduler:execute |
Execute given Scheduler tasks. |
scheduler:list |
List all Scheduler tasks. |
scheduler:run |
Start the TYPO3 Scheduler from the command line. |
site |
|
site:list |
Shows the list of sites available to the system |
site:show |
Shows the configuration of the specified site |
syslog |
|
syslog:list |
Show entries from the sys_log database table of the last 24 hours. |
upgrade |
|
upgrade:list |
List available upgrade wizards. |
upgrade:run |
Run upgrade wizard. Without arguments all available wizards will be run. |
workspace |
|
workspace:autopublish |
Publish a workspace with a publication date. |
completion
-
completion
Back to list -
Dump the shell completion scriptUsage
completion [--debug] [--] [<shell>]
Copied!Argumentsshell
HelpThe
completion
command dumps the shell completion script required to use shell autocompletion (currently, bash, fish, zsh completion are supported).Static installationDump the script to a global completion file and restart your shell:
completion | sudo tee /etc/bash_completion.d/typo3
Copied!Or dump the script to a local file and source it:
completion > completion.sh # source the file whenever you use the project source completion.sh # or add this line at the end of your "~/.bashrc" file: source /path/to/completion.sh
Copied!Dynamic installationAdd this to the end of your shell configuration file (e.g.
"~/.
):bashrc" eval "$(/var/www/html/completion )"
Copied!
help
-
help
Back to list -
Display help for a commandUsage
help [--format FORMAT] [--raw] [--] [<command_name>]
Copied!HelpThe
help
command displays help for a given command:help list
Copied!You can also output the help in other formats by using the --format option:
help --format=xml list
Copied!To display the list of available commands, please use the
list
command.
list
-
list
Back to list -
List commandsUsage
list [--raw] [--format FORMAT] [--short] [--] [<namespace>]
Copied!HelpThe
list
command lists all commands:list
Copied!You can also display the commands for a specific namespace:
list test
Copied!You can also output the information in other formats by using the --format option:
list --format=xml
Copied!It's also possible to get raw list of commands (useful for embedding command runner):
list --raw
Copied!
setup
-
setup
Back to list -
Setup TYPO3 via CLI using environment variables, CLI options or interactiveUsage
setup [--driver [DRIVER]] [--host HOST] [--port [PORT]] [--dbname DBNAME] [--username USERNAME] [--password PASSWORD] [--admin-username [ADMIN-USERNAME]] [--admin-user-password ADMIN-USER-PASSWORD] [--admin-email ADMIN-EMAIL] [--project-name PROJECT-NAME] [--create-site [CREATE-SITE]] [--server-type [SERVER-TYPE]] [--force] [-n|--no-interaction]
Copied!Help- The command offers 3 ways to setup TYPO3:
-
- environment variables
- commandline options
- interactive guided walk-through
All values are validated no matter where it was set. If a value is missing, the user will be asked for it.
Setup using environment variables
TYPO3_DB_DRIVER=mysqli \ TYPO3_DB_USERNAME=db \ TYPO3_DB_PORT=3306 \ TYPO3_DB_HOST=db \ TYPO3_DB_DBNAME=db \ TYPO3_SETUP_ADMIN_EMAIL=admin@example.com \ TYPO3_SETUP_ADMIN_USERNAME=admin \ TYPO3_SETUP_CREATE_SITE="https://your-typo3-site.com/" \ TYPO3_PROJECT_NAME="Automated Setup" \ TYPO3_SERVER_TYPE="apache" \ ./setup --force
Copied!Warning
Variable
TYPO3_
(optionDB_ PASSWORD --
) can be used to provide a password for the database andpassword TYPO3_
(optionSETUP_ ADMIN_ PASSWORD --
) for the admin user password. Using this can be a security risk since the password may end up in shell history files. Prefer the interactive mode. Additionally, writing a command to shell history can be suppressed by prefixing the command with a space when usingadmin- user- password bash
orzsh
.
backend:lock
-
backend:lock
Back to list -
Lock the TYPO3 BackendUsage
backend:lock [<redirect>]
Copied!Argumentsredirect
HelpLock the TYPO3 Backend
backend:resetpassword
-
backend:resetpassword
Back to list -
Trigger a password reset for a backend userUsage
backend:resetpassword <backendurl> <email>
Copied!Argumentsbackendurl
email
HelpTrigger a password reset for a backend user
backend:unlock
-
backend:unlock
Back to list -
Unlock the TYPO3 BackendUsage
backend:unlock
Copied!HelpUnlock the TYPO3 Backend
backend:user:create
-
backend:user:create
Back to list -
Create a backend userUsage
backend:user:create [-u|--username USERNAME] [-p|--password PASSWORD] [-e|--email EMAIL] [-g|--groups GROUPS] [-a|--admin] [-m|--maintainer]
Copied!HelpCreate a backend user using environment variables
Example:
TYPO3_BE_USER_NAME=username \ TYPO3_BE_USER_EMAIL=admin@example.com \ TYPO3_BE_USER_GROUPS=<comma-separated-list-of-group-ids> \ TYPO3_BE_USER_ADMIN=0 \ TYPO3_BE_USER_MAINTAINER=0 \ ./backend:user:create --no-interaction
Copied!Warning
Variable "TYPO3_BE_USER_PASSWORD" and options "-p" or "--password" can be used to provide a password. Using this can be a security risk since the password may end up in shell history files. Prefer the interactive mode. Additionally, writing a command to shell history can be suppressed by prefixing the command with a space when using
bash
orzsh
.
cache:flush
-
cache:flush
Back to list -
Flush TYPO3 caches.Usage
cache:flush [-g|--group [GROUP]]
Copied!HelpThis command can be used to clear the caches, for example after code updates in local development and after deployments.
cache:warmup
-
cache:warmup
Back to list -
Warmup TYPO3 caches.Usage
cache:warmup [-g|--group [GROUP]]
Copied!HelpThis command is useful for deployments to warmup caches during release preparation.
cleanup:deletedrecords
-
cleanup:deletedrecords
Back to list -
Permanently deletes all records marked as "deleted" in the database.Usage
cleanup:deletedrecords [-p|--pid PID] [-d|--depth DEPTH] [--dry-run] [-m|--min-age MIN-AGE]
Copied!HelpTraverse page tree and find and flush deleted records. If you want to get more detailed information, use the --verbose option.
cleanup:flexforms
-
cleanup:flexforms
Back to list -
Updates all database records which have a FlexForm field and the XML data does not match the chosen datastructure.Usage
cleanup:flexforms [-p|--pid PID] [-d|--depth DEPTH] [--dry-run]
Copied!HelpTraverse page tree and find and clean/update records with dirty FlexForm values. If you want to get more detailed information, use the --verbose option.
cleanup:localprocessedfiles
-
cleanup:localprocessedfiles
Back to list -
Delete processed files and their database records.Usage
cleanup:localprocessedfiles [--dry-run] [-f|--force]
Copied!HelpIf you want to get more detailed information, use the --verbose option.
cleanup:missingrelations
-
cleanup:missingrelations
Back to list -
Find all record references pointing to a non-existing recordUsage
cleanup:missingrelations [--dry-run] [--update-refindex]
Copied!HelpAssumptions: - a perfect integrity of the reference index table (always update the reference index table before using this tool!) - all database references to check are integers greater than zero - does not check if a referenced record is inside an offline branch, another workspace etc. which could make the reference useless in reality or otherwise question integrity Records may be missing for these reasons (except software bugs): - someone deleted the record which is technically not an error although it might be a mistake that someone did so. - after flushing published versions and/or deleted-flagged records a number of new missing references might appear; those were pointing to records just flushed.
An automatic repair is only possible for managed references are (not for soft references), for offline versions records and non-existing records. If you just want to list them, use the --dry-run option. The references in this case are removed.
If the option "--dry-run" is not set, all managed files (TCA/FlexForm attachments) will silently remove the references to non-existing and offline version records. All soft references with relations to non-existing records, offline versions and deleted records require manual fix if you consider it an error.
Manual repair suggestions: - For soft references you should investigate each case and edit the content accordingly. - References to deleted records can theoretically be removed since a deleted record cannot be selected and hence your website should not be affected by removal of the reference. On the other hand it does not hurt to ignore it for now. To have this automatically fixed you must first flush the deleted records after which remaining references will appear as pointing to Non Existing Records and can now be removed with the automatic fix.
If you want to get more detailed information, use the --verbose option.
cleanup:orphanrecords
-
cleanup:orphanrecords
Back to list -
Find and delete records that have lost their connection with the page tree.Usage
cleanup:orphanrecords [--dry-run]
Copied!HelpAssumption: All actively used records on the website from TCA configured tables are located in the page tree exclusively.
All records managed by TYPO3 via the TCA array configuration has to belong to a page in the page tree, either directly or indirectly as a version of another record. VERY TIME, CPU and MEMORY intensive operation since the full page tree is looked up!
Automatic Repair of Errors: - Silently deleting the orphaned records. In theory they should not be used anywhere in the system, but there could be references. See below for more details on this matter.
Manual repair suggestions: - Possibly re-connect orphaned records to page tree by setting their "pid" field to a valid page id. A lookup in the sys_refindex table can reveal if there are references to an orphaned record. If there are such references (from records that are not themselves orphans) you might consider to re-connect the record to the page tree, otherwise it should be safe to delete it.
If you want to get more detailed information, use the --verbose option.
cleanup:previewlinks
-
cleanup:previewlinks
Back to list -
Clean up expired preview links from shared workspace previews.Usage
cleanup:previewlinks
Copied!HelpLook for preview links within the database table "sys_preview" that have been expired and and remove them. This command should be called regularly when working with workspaces.
cleanup:versions
-
cleanup:versions
Back to list -
Find all versioned records and possibly cleans up invalid records in the database.Usage
cleanup:versions [-p|--pid PID] [-d|--depth DEPTH] [--dry-run] [--action [ACTION]]
Copied!HelpTraverse page tree and find versioned records. Also list all versioned records, additionally with some inconsistencies in the database, which can cleaned up with the "action" option. If you want to get more detailed information, use the --verbose option.
extension:list
-
extension:list
Back to list -
Shows the list of extensions available to the systemUsage
extension:list [-a|--all] [-i|--inactive]
Copied!HelpShows the list of extensions available to the system
extension:setup
-
extension:setup
Back to list -
Set up extensionsUsage
extension:setup [-e|--extension EXTENSION]
Copied!HelpSetup all extensions or the given extension by extension key. This must be performed after new extensions are required via Composer.
The command performs all necessary setup operations, such as database schema changes, static data import, distribution files import etc.
The given extension keys must be recognized by TYPO3 or will be ignored.
impexp:export
-
impexp:export
Back to list -
Exports a T3D / XML file with content of a page treeUsage
impexp:export [--type [TYPE]] [--pid [PID]] [--levels [LEVELS]] [--table [TABLE]] [--record [RECORD]] [--list [LIST]] [--include-related [INCLUDE-RELATED]] [--include-static [INCLUDE-STATIC]] [--exclude [EXCLUDE]] [--exclude-disabled-records] [--exclude-html-css] [--title [TITLE]] [--description [DESCRIPTION]] [--notes [NOTES]] [--dependency [DEPENDENCY]] [--save-files-outside-export-file] [--] [<filename>]
Copied!HelpExports a T3D / XML file with content of a page tree
impexp:import
-
impexp:import
Back to list -
Imports a T3D / XML file with content into a page treeUsage
impexp:import [--update-records] [--ignore-pid] [--force-uid] [--import-mode [IMPORT-MODE]] [--enable-log] [--] <file> [<pid>]
Copied!HelpImports a T3D / XML file with content into a page tree
language:update
-
language:update
Back to list -
Update the language files of all activated extensionsUsage
language:update [--no-progress] [--fail-on-warnings] [--skip-extension SKIP-EXTENSION] [--] [<locales>...]
Copied!Argumentslocales
HelpUpdate the language files of all activated extensions
mailer:spool:send
-
mailer:spool:send
Back to list -
Sends emails from the spoolUsage
mailer:spool:send [--message-limit MESSAGE-LIMIT] [--time-limit TIME-LIMIT] [--recover-timeout RECOVER-TIMEOUT]
Copied!swiftmailer:spool:send
Copied!HelpSends emails from the spool
messenger:consume
-
messenger:consume
Back to list -
Consume messagesUsage
messenger:consume [--sleep SLEEP] [--queues QUEUES] [--exit-code-on-limit EXIT-CODE-ON-LIMIT] [--] [<receivers>...]
Copied!HelpThe
messenger:
command consumes messages and dispatches them to the message bus.consume php messenger:consume <receiver-name>
To receive from multiple transports, pass each name:
php messenger:consume receiver1 receiver2
Copied!Use the --queues option to limit a receiver to only certain queues (only supported by some receivers):
php messenger:consume <receiver-name> --queues=fasttrack
Copied!
redirects:checkintegrity
-
redirects:checkintegrity
Back to list -
Check integrity of redirectsUsage
redirects:checkintegrity [<site>]
Copied!HelpCheck integrity of redirects
redirects:cleanup
-
redirects:cleanup
Back to list -
Cleanup old redirects periodically for given constraints like days, hit count or domains.Usage
redirects:cleanup [-d|--domain [DOMAIN]] [-s|--statusCode [STATUSCODE]] [-a|--days [DAYS]] [-c|--hitCount [HITCOUNT]] [-p|--path [PATH]] [-t|--creationType [CREATIONTYPE]]
Copied!HelpCleanup old redirects periodically for given constraints like days, hit count or domains.
referenceindex:update
-
referenceindex:update
Back to list -
Update the reference index of TYPO3Usage
referenceindex:update [-c|--check]
Copied!HelpUpdate the reference index of TYPO3
scheduler:execute
-
scheduler:execute
Back to list -
Execute given Scheduler tasks.Usage
scheduler:execute [-t|--task [TASK]]
Copied!HelpExecute given Scheduler tasks.
scheduler:list
-
scheduler:list
Back to list -
List all Scheduler tasks.Usage
scheduler:list [-g|--group [GROUP]] [-w|--watch [WATCH]]
Copied!HelpList all Scheduler tasks.
scheduler:run
-
scheduler:run
Back to list -
Start the TYPO3 Scheduler from the command line.Usage
scheduler:run [-i|--task [TASK]] [-f|--force] [-s|--stop]
Copied!HelpIf no parameter is given, the scheduler executes any tasks that are overdue to run. Call it like this: typo3/sysext/core/scheduler:run --task=13 -f
site:list
-
site:list
Back to list -
Shows the list of sites available to the systemUsage
site:list
Copied!HelpShows the list of sites available to the system
site:show
-
site:show
Back to list -
Shows the configuration of the specified siteUsage
site:show <identifier>
Copied!HelpShows the configuration of the specified site
syslog:list
-
syslog:list
Back to list -
Show entries from the sys_log database table of the last 24 hours.Usage
syslog:list
Copied!HelpPrints a list of recent sys_log entries. If you want to get more detailed information, use the --verbose option.
upgrade:list
-
upgrade:list
Back to list -
List available upgrade wizards.Usage
upgrade:list [-a|--all]
Copied!HelpList available upgrade wizards.
upgrade:run
-
upgrade:run
Back to list -
Run upgrade wizard. Without arguments all available wizards will be run.Usage
upgrade:run [<wizardName>]
Copied!HelpThis command allows running upgrade wizards on CLI. To run a single wizard add the identifier of the wizard as argument. The identifier of the wizard is the name it is registered with in ext_localconf.
workspace:autopublish
-
workspace:autopublish
Back to list -
Publish a workspace with a publication date.Usage
workspace:autopublish
Copied!HelpSome workspaces can have an auto-publish publication date to put all "ready to publish" content online on a certain date.