Skip to content

All commands

Tip

Press the / key to Search for a command. Or use your browser's Find in Page feature.

General

Command Description Aliases
browse Display a link to a given path
content:export Exports content entities in YAML format.
core:route View information about all routes or one route. route
generate-theme Generates a new theme based on latest default markup.
help Display help for a command
install Install Drupal using an install profile or recipe.
list List commands
mk:docs Build a Markdown document for each available command.
quick-start Installs a Drupal site and starts a web server for local testing or development.
server Starts up a webserver for a site.

cache

Command Description Aliases
cache:clear Clear a specific cache, or all Drupal caches. cc, cache-clear
cache:get Fetch a cached object and display it. cg, cache-get
cache:rebuild Rebuild all caches. cr, rebuild
cache:set Cache an object expressed in JSON or string format. cs, cache-set
cache:tags Invalidate by cache tags. ct
cache:warm Pre-warm all caches. cw, cache-warm

config

Command Description Aliases
config:delete Delete a configuration key, or a whole object(s). cdel, config-delete
config:export Export configuration.
config:get Display a config value, or a whole configuration object. cget, config-get
config:import Import configuration cim
config:set Save a config value directly. Does not perform a config import. cset, config-set
config:status Display status of configuration (differences between the filesystem and database). cst, config-status

deploy

Command Description Aliases
deploy Run several commands after performing a code deployment. The commands run without prompting.
deploy:hook Run pending deploy hooks.
deploy:hook-status List pending deploy hooks.
deploy:mark-complete Mark all pending deploy hooks as having run.

entity

Command Description Aliases
entity:delete Delete content entities. edel, entity-delete
entity:save Re-save entities, and publish/unpublish if specified. esav, entity-save

ex

Command Description Aliases
ex:install Installs one or more modules or themes. exin, pm:install, pm:enable, enable, en
ex:list List extensions. pm:list, pml
ex:uninstall Uninstalls one or more modules or themes. exun, pm:uninstall, pmu

maint

Command Description Aliases
maint:disable Take the site out of maintenance mode.
maint:enable Put the site into maintenance mode.
maint:status Print maintenance mode (1 or 0). Fails if enabled. mstatus

php

Command Description Aliases
php:eval Evaluate arbitrary php code after bootstrapping Drupal (if available). eval, ev, php-eval
php:script Run a php script after a full Drupal bootstrap. scr, php-script

queue

Command Description Aliases
queue:delete Delete all items in a specific queue. queue-delete
queue:list Returns a list of all defined queues. queue-list
queue:run Run a specific queue by name. queue-run

recipe

Command Description Aliases
recipe:apply Applies a recipe to a site. recipe
recipe:info Shows information about a recipe.

role

Command Description Aliases
role:create Create a new role. rcrt, role-create
role:delete Delete a role. rdel, role-delete
role:list Display roles and their permissions. rls, role-list
role:perm:add Grant specified permission(s) to a role. rap, role-add-perm
role:perm:remove Remove specified permission(s) from a role. rmp, role-remove-perm

sql

Command Description Aliases
sql:cli Open a SQL command-line interface using Drupal's credentials. sqlc, sql-cli
sql:connect Print a string for connecting to the database. sql-connect
sql:drop Drop all tables in a given database. sql-drop
sql:dump Export the Drupal DB as SQL using mysqldump or equivalent. sql-dump
sql:query Execute a query against a database. sqlq, sql-query
sql:sanitize Sanitize the database by removing or obfuscating user data. sqlsan, sql-sanitize

state

Command Description Aliases
state:delete Delete a state entry. sdel, state-delete
state:get Display a state value. sget, state-get
state:set Set a state value. sset, state-set

system

Command Description Aliases
system:cron Runs cron implementations. cron, core:cron
system:status Show system status. status

updatedb

Command Description Aliases
updatedb Apply pending database updates. Enables maintenance mode during the run. updb
updatedb:status List pending database updates. updbst

user

Command Description Aliases
user:block Block the specified user(s). ublk, user-block
user:cancel Block or delete user account(s) with the specified name(s). ucan, user-cancel
user:create Create a user account. ucrt, user-create
user:information Print information about the specified user(s). uinf, user-information
user:login Generate a one-time login link. uli
user:password Set the password for the user account with the specified name. upwd, user-password
user:role:add Add a role to the specified user accounts. urol, user-add-role
user:role:remove Remove a role from the specified user accounts. urrol, user-remove-role
user:unblock Unblock the specified user(s). uublk, user-unblock

watchdog

Command Description Aliases
watchdog:delete Delete watchdog log records. wd-del, wd-delete, wd, watchdog-delete
watchdog:list Interactively filter the watchdog message listing. wd-list, watchdog-list
watchdog:show Show watchdog messages. wd-show, ws, watchdog-show
watchdog:show-one Show one log record by ID. Deprecated: use watchdog:show --id=ID. wd-one, watchdog-show-one
watchdog:tail Tail watchdog messages. wd-tail, wt, watchdog-tail

why

Command Description Aliases
why:config List all config entities depending on a given config entity. wc
why:module List all objects (modules, configurations) depending on a given module. wm