Magento 2 command list

magento 2 command list

Hello reader today we share list of the some usfull magento 2 command list.

You will find the list of important commands Magento 2.

Connect the SSH and go to magento root directory to run/execute the commands

MAGENTO 2 USEFUL COMMANDS LIST

Elasticsearch entry into Database

bin/magento config:set catalog/search/engine elasticsearch7
bin/magento config:set catalog/search/elasticsearch7_server_hostname 191.161.1.11
bin/magento config:set catalog/search/elasticsearch7_server_port 9200 
bin/magento config:set catalog/search/elasticsearch7_server_timeout 15
bin/magento config:set catalog/search/elasticsearch7_index_prefix magento
bin/magento config:set catalog/search/elasticsearch7_enable_auth 0

Check the Magento version

php bin/magento --version 

Check The Magento Admin Path/URI

php bin/magento info:adminuri 

Check the module enable or disable

php bin/magento module:status

Clean the Magento cache

php bin/magento cache:clean 

Flush the Magento cache

php bin/magento cache:flush  

Disable the Magento cache

php bin/magento cache:disable

Setup upgrade command

php bin/magento setup:upgrade 

Compile the code command

php bin/magento setup:di:compile 

Setup deploy command

php bin/magento setup:static-content:deploy -f 

Set/update base url

php bin/magento setup:store-config:set --base-url="http://example.com/"

Set/update secure base url

php bin/magento setup:store-config:set --base-url-secure="https://example.com/"

Disable ask change admin password

php bin/magento config:set admin/security/password_is_forced 0

Disable admin password lifetime

php bin/magento config:set admin/security/password_lifetime 0

Enable template path hint

php bin/magento dev:template-hints:enable

Disable template path hint

php bin/magento dev:template-hints:disable

Create new admin user

php bin/magento admin:user:create

Display mode of the application

php bin/magento deploy:mode:show

Set developer mode of the application

php bin/magento deploy:mode:set developer --skip-compilation

Set production mode of the application

 php bin/magento deploy:mode:set production --skip-compilation

Check maintenance status

php bin/magento maintenance:status

Enable maintenance mode

php bin/magento maintenance:enable

Enable maintenance mode with ips allow

php bin/magento maintenance:enable --ip=192.168.1.10 --ip=192.168.1.11

Disable maintenance mode

php bin/magento maintenance:disable

Unlock admin user

php bin/magento admin:user:unlock username

Product image resize

php bin/magento catalog:images:resize

Product attributes cleanup

php bin/magento catalog:product:attributes:cleanup

Cron job install

php bin/magento cron:install --force

Schedule cron job

php bin/magento cron:run

Remove/delete cron job

php bin/magento cron:remove

Reset indexer

php bin/magento indexer:reset

Reindexing command

php bin/magento indexer:reindex

Indexer info

php bin/magento indexer:info

Disable module

php bin/magento module:disable VendorName_ModuleName

Enable module

php bin/magento module:enable VendorName_ModuleName

Uninstall module

php bin/magento module:uninstall VendorName_ModuleName

Show store list

php bin/magento store:list

Show website list

php bin/magento store:website:list

Set session size

php bin/magento config:set system/security/max_session_size_admin 0

Take backup –db, –media, –code

php bin/magento setup:backup --db
php bin/magento setup:backup --code
php bin/magento setup:backup --media

Clear queue for mass action

php bin/magento queue:consumers:list
php bin/magento queue:consumers:start product_action_attribute.update

Hope above Magento 2 command list make easy work 🙂

Related blogs – Create Enquiry Form In Magento 2

Like us on Facebook

Leave a Reply

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

Back To Top