Magento 2 useful command Part 2

if you are magento 2 developer so this post is helpful to you. before I created one blog called “Magento 2 useful command Part 1” so I mentioned some command related to Cache, Admin, Modules, Indexer and Info commands. now in this post I will share some other command like Store, Deploy, Available, Sampledata, Cron, Config, Encryption, Maintenance and Braintree etc. I have also mentioning short command as well so you can use this command.

Store Commands –

Here list of some command that are Magento 2 store related command. like store, theme and website etc.

1) it displays list of websites available in magento 2.

Command :

 php bin/magento store:website:list

 OR

 php bin/magento s:w:l

2) it displays the list of stores

Command :

php bin/magento store:list

 OR

 php bin/magento s:l

3) it uninstalls theme

Command :

php bin/magento theme:uninstall

 OR

 php bin/magento t:u

Available commands –

Here list of some command that are Magento 2 available command. like help and list type command.

1) it displays help for a command

Command :

php bin/magento help

OR

php bin/magento h

2) it lists commands

Command :

php bin/magento list

OR

php bin/magento l

Deploy commands –

Here list of some command that are Magento 2 deployment. like deploy application mode.

1) it set application mode

Command :

php bin/magento deploy:mode:set

OR 

php bin/magento d:m:set

2) it displays current application mode

Command :

php bin/magento deploy:mode:show

OR 

php bin/magento d:m:sho

Sampledata command –

Here list of some command that are Magento 2 sampledata management command. like deploy sample data, remove and reset it.

1) it deploy sample data modules for composer-based Magento installations

Command :

php bin/magento sampledata:deploy	

OR

php bin/magento sa:d

2) it remove all sample data packages from composer.json

Command :

php bin/magento sampledata:remove	

OR

php bin/magento sa:rem

3) it reset all sample data modules for re-installation

Command :

php bin/magento sampledata:reset	

OR

php bin/magento sa:res

Cron commands –

Here list of some command that are related to Magento 2 cron. like cron install, remove and run.

1) it generates and install cron for current user

Command :

php bin/magento cron:install	

OR

php bin/magento c:in

2) it removes tasks from cron

Command :

php bin/magento cron:remove	

OR

php bin/magento c:re

3) it runs cron jobs by schedule

Command :

php bin/magento cron:run	

OR

php bin/magento c:r	

Catalog commands –

Here list of some command that are related to Magento 2 catalog management. like product attribute and images.

1) it creates resize product images

Command :

php bin/magento catalog:images:resize

OR

php bin/magento c:i:r

2) It removes unused product attributes

Command :

php bin/magento catalog:product:attributes:cleanup	

OR

php bin/magento c:p:a:c	

Customer commands –

Here list of some command that are related to Magento 2 customer.

1) it will upgrade customer’s hash according to latest algorithm

Command :

php bin/magento customer:hash:upgrade	

 OR

 php bin/magento c:h:u

App commands –

Here list of some command that are related to Magento 2 application. like dump of application, import configuration and check configuration status.

1) it create dump of application

Command :

php bin/magento app:config:dump	

OR

php bin/magento a:c:d

2) it import data from configuration files to appropriate data storage

Command :

php bin/magento app:config:import	

OR

php bin/magento a:c:i

3) it checks if config propagation requires to update

Command :

php bin/magento app:config:status	

OR

php bin/magento a:c:s

Braintree commands –

Here list of some command that are related to Magento 2 braintree cards import from magento 2 database.

1) It migrate stored cards from Magento 1 database

Command :

php bin/magento braintree:migrate	

OR

php bin/magento b:m	

Config commands –

Here list of some command that are related to Magento 2 Configuration management.

1) it set sensitive configuration values

Command :

php bin/magento config:sensitive:set	

OR 

php bin/magento c:s:s	

2) it change system configuration

Command :

php bin/magento config:set	

OR

php bin/magento c:set

3) it shows configuration value for given path. If path is not available so all saved values shown.

Command :

php bin/magento config:show	

OR

php bin/magento c:sho

Encryption commands –

Here list of some command that are related to Magento 2 encryption related.

1) it re-encrypts encrypted credit card data with updated encryption cipher data

Command :

php bin/magento encryption:payment-data:update	

 OR

 php bin/magento e:p:u	

Maintenance commands –

Here list of some command that are related to Magento 2 Maintenance related.

1) It sets maintenance mode exempt IP address.

Command :

php bin/magento maintenance:allow-ips	

OR

php bin/magento ma:a	

2) It disables maintenance mode by command

Command :

php bin/magento maintenance:disable	

OR

php bin/magento ma:d

3) It enables maintenance mode

Command :

php bin/magento maintenance:enable	

OR

php bin/magento ma:e

4) It displays maintenance mode status

Command :

php bin/magento maintenance:status	

OR

php bin/magento ma:s

Write-up

In webdeveloperindia tutorial, I have covered some basic Magento commands. I hope you got this tutorial very useful. If you want to give any feedback or share it in the comments section below.

Leave a Reply

Your email address will not be published. Required fields are marked *

− 7 = 1