Magento 2 CLI Reference
Every bin/magento command — arguments, options, copy-paste examples, and links to related commands. Pinned to Magento 2.4.9 (extracted from source · curated examples).
Showing all 118 commands.
admin:adobe-ims:disable
Disable Adobe IMS Module
admin:adobe-ims:enable
Enable Adobe IMS Module.
admin:adobe-ims:info
Information of Adobe IMS Module configuration
admin:adobe-ims:status
Status of Adobe IMS Module
admin:user:create
Creates an administrator
admin:user:unlock
Unlocks an admin account locked by failed login attempts.
app:config:dump
Creates a dump of the application's configuration into config.php and env.php for promotion to other environments.
app:config:import
Imports configuration from shared config files (config.php / env.php) into the database.
app:config:status
Checks if data in app/etc/config.php is up to date with the database.
braintree:migrate
Migrate stored cards from a Magento 1 database
cache:clean
Cleans cache type(s). Removes invalidated entries; finer-grained than cache:flush.
cache:clean:payment_services_merchant_scopes
Clean Payment Services Merchant scopes cache
cache:disable
Disables one or more cache types. Cache stops being read or written until re-enabled.
cache:enable
Enables one or more cache types.
cache:flush
Flushes cache storage used by cache type(s). Wipes Redis/file cache fully — heavier than cache:clean.
cache:status
Shows the enabled/disabled state of every cache type.
catalog:images:resize
Pre-generates resized product image variants so the storefront doesn't generate them on-the-fly during the first page view.
catalog:product:attributes:cleanup
Removes orphaned product attribute records from EAV value tables.
cms:wysiwyg:restrict
Set whether to enforce user HTML content validation or show a warning instead
completion
Dump the shell completion script (bash, zsh, fish)
config:sensitive:set
Sets sensitive configuration values (those that should live in env.php, not config.php — API keys, payment credentials).
config:set
Sets a configuration value. Stored in core_config_data.
config:show
Shows configuration value for given path. If path is not specified, all saved values will be shown
cron:install
Installs Magento crontab in the OS crontab for the current user.
cron:remove
Removes tasks from crontab
cron:run
Runs jobs from a single cron group (or all groups). Manual invocation of what cron normally schedules.
customer:hash:upgrade
Upgrades customer password hashes to the latest algorithm. Run after upgrading from older Magento versions.
deploy:mode:set
Sets the application mode: developer, default, or production.
deploy:mode:show
Shows the current application mode.
dev:di:info
Provides information on Dependency Injection configuration for the Command.
dev:email:newsletter-compatibility-check
Scans newsletter templates for potential variable usage compatibility issues
dev:email:override-compatibility-check
Scans email template overrides for potential variable usage compatibility issues
dev:profiler:disable
Disables the application profiler.
dev:profiler:enable
Enables the application profiler with optional driver.
dev:query-log:disable
Disable DB query logging
dev:query-log:enable
Enables SQL query logging for performance debugging.
dev:source-theme:deploy
Collects and publishes source CSS/LESS files for a theme. Used during theme development to refresh static assets.
dev:template-hints:disable
Disable frontend template hints. A cache flush might be required.
dev:template-hints:enable
Enables template path hints on the storefront — overlays each block with its template path.
dev:template-hints:status
Show frontend template hints status.
dev:tests:run
Runs Magento's test suites (unit, integration, static, etc.).
dev:urn-catalog:generate
Generates a catalog of URNs for the IDE so XSD references in XML files resolve to local files.
dev:xml:convert
Converts an XML file using an XSL stylesheet. Used internally by some upgrade tooling.
downloadable:domains:add
downloadable:domains:remove
downloadable:domains:show
encryption:data:list-re-encryptors
Shows a list of available data re-encryptors.
encryption:data:re-encrypt
Re-encrypts encrypted data using current encryption key.
encryption:key:change
Change the encryption key inside the env.php file.
encryption:payment-data:update
Re-encrypts encrypted credit card data with latest encryption cipher.
help
Display help for a command
i18n:collect-phrases
Collects translatable phrases from the codebase into a CSV file.
i18n:pack
Packs a translation dictionary CSV into a Magento language package.
i18n:uninstall
Uninstalls one or more language packages.
indexer:info
Shows information on registered indexers (id and description).
indexer:reindex
Reindexes data (one indexer or all). Heavier than a normal cron tick — re-runs the full mview.
indexer:reset
Resets indexer status to invalid — forces the next reindex to do a full rebuild.
indexer:set-dimensions-mode
Set Indexer Dimensions Mode
indexer:set-mode
Sets the index mode for an indexer.
indexer:set-status
Sets the specified indexer status
indexer:show-dimensions-mode
Show Indexer Dimension Mode
indexer:show-mode
Shows the current mode for each indexer.
indexer:status
Shows the status of all indexers (Ready, Reindex Required, Working).
info:adminuri
Shows the configured Magento admin URI (the random suffix after /admin/).
info:backups:list
Prints list of available backup files
info:currency:list
Displays the list of available currencies
info:dependencies:show-framework
Shows number of dependencies on Magento framework
info:dependencies:show-modules
Shows number of dependencies between modules
info:dependencies:show-modules-circular
Shows circular dependencies between modules — a code-quality red flag.
info:language:list
Displays the list of available language locales
info:timezone:list
Displays the list of available timezones
inventory-geonames:import
Download and import geo names for source selection algorithm
inventory:reservation:create-compensations
Create reservations by provided compensation arguments
inventory:reservation:list-inconsistencies
Show all orders and products with salable quantity inconsistencies
list
List commands
maintenance:allow-ips
Sets exempt IP addresses for maintenance mode without enabling it.
maintenance:disable
Disables maintenance mode
maintenance:enable
Puts the storefront into maintenance mode (visitors see a 503 page).
maintenance:status
Shows whether maintenance mode is enabled and which IPs are exempt.
media-content:sync
Synchronize content with assets
media-gallery:sync
Synchronize media storage and media assets in the database
module:config:status
Checks the modules configuration in the \
module:disable
Disables specified modules
module:enable
Enables specified modules
module:status
Lists enabled/disabled modules. Filter by vendor.
module:uninstall
Uninstalls modules installed by composer
newrelic:create:deploy-marker
Check the deploy queue for entries and create an appropriate deploy marker.
queue:consumers:list
Lists all message-queue consumers.
queue:consumers:restart
Restart MessageQueue consumers (puts a poison pill so consumers exit on next status check)
queue:consumers:start
Starts a single consumer to process queued messages. Run via supervisor in production.
remote-storage:sync
Synchronize media files with remote storage.
saas:initialize:project
Initialize a new project for the merchant configured in the service connector
saas:list:projects
Lists projects info for the merchant configured in the service connector
saas:resync
Re-sync feed data to the SaaS service
sampledata:deploy
Deploy sample data modules for composer-based Magento installations
sampledata:remove
Remove all sample data packages from composer.json
sampledata:reset
Resets all sample data modules so they re-run on the next setup:upgrade.
security:recaptcha:disable-for-user-forgot-password
Disable reCAPTCHA for the admin user forgot-password form
security:recaptcha:disable-for-user-login
Disable reCAPTCHA for the admin user login form
setup:backup
Takes backup of Magento Application code base, media and database
setup:config:set
Creates or modifies the deployment configuration
setup:db-data:upgrade
Upgrades only the database data (without schema changes).
setup:db-declaration:generate-patch
Generates a data or schema patch class skeleton inside a module's Setup/Patch/ directory.
setup:db-declaration:generate-whitelist
Generates a db_schema_whitelist.json file alongside the module's db_schema.xml. Run after editing db_schema.xml.
setup:db-schema:upgrade
Upgrades only the database schema (without data fixes). Used for staged upgrades.
setup:db:status
Checks if the database schema and data are up to date — does setup:upgrade need to run?
setup:di:compile
Generates DI configuration, factories, proxies, and interceptors. Required for production mode.
setup:install
Installs Magento — creates schema, data, admin user, and base config. Run once when bringing a fresh database online.
setup:performance:generate-fixtures
Generates synthetic catalog/customer/order fixtures to stress-test performance work.
setup:rollback
Rolls back Magento Application code, media, and database from a previous backup.
setup:static-content:deploy
Deploys static view files (CSS, JS, images, fonts) for one or more locales.
setup:store-config:set
Sets store-level config (base URL, language, currency, etc.) without going through the admin UI.
setup:uninstall
Uninstalls Magento — drops every Magento table and removes generated/var content.
setup:upgrade
Upgrades the Magento application, database data, and schema. Run after enabling a module, after composer update, and as part of every deploy.
store:list
Lists all stores (store views) configured in the install.
store:website:list
Lists all websites configured in the install.
theme:uninstall
Uninstalls one or more themes installed via Composer.
varnish:vcl:generate
Generates Varnish VCL and echos it to the command line
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.