Created
July 29, 2019 08:49
-
-
Save abdullahbutt/c2abbcc5d8cd1c9062501b3b32e3f6eb to your computer and use it in GitHub Desktop.
magento composer commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*************** Standard Commands Start****************** | |
1) php bin/magento cache:flush | |
2) php bin/magento setup:upgrade | |
3) php bin/magento setup:di:compile | |
4) php bin/magento setup:static-content:deploy -f | |
5) php bin/magento indexer:reindex | |
6) php bin/magento cache:clean | |
*************** Standard Commands End ****************** | |
Magento CommandsSetup Upgrade Using Command Line | |
php bin/magento setup:upgrade | |
If you don’t want to remove pub/static files while installing/updating database then use following command. | |
php bin/magento setup:upgrade --keep-generated | |
Cache Clean Using Command Line | |
php bin/magento cache:clean | |
Cache Flush Using Command Line | |
php bin/magento cache:flush | |
View cache status Using Command Line | |
php bin/magento cache:status | |
Enable Cache Using Command Line | |
php bin/magento cache:enable [cache_type] | |
Disable Cache Using Command Line | |
php bin/magento cache:disable [cache_type] | |
Static Content Deploy Using Command Line (Use -f for force deploy on 2.2.x or later) | |
php bin/magento setup:static-content:deploy | |
Static Content Deploy For Particular Language Using Command Line | |
php bin/magento setup:static-content:deploy en_US | |
Static Content Deploy For Magento Backend Theme Using Command Line (Working on 2.1.1 or later) | |
php bin/magento setup:static-content:deploy --theme="Magento/backend" | |
Static Content Deploy For Specific Themes Using Command Line (Working on 2.1.1 or later) | |
php bin/magento setup:static-content:deploy --theme Magento/luma --theme Magento/second_theme | |
Exclude Themes on Static Content Deploy and does not minify HTML files Using Command Line (Working on 2.1.1 or later) | |
php bin/magento setup:static-content:deploy en_US --exclude-theme Magento/luma --no-html-minify | |
Reindexing Using Command Line | |
php bin/magento indexer:reindex | |
View the list of indexers Using Command Line | |
php bin/magento indexer:info | |
View indexer status Using Command Line | |
php bin/magento indexer:status | |
Show the mode of all indexers Using Command Line | |
php bin/magento indexer:show-mode | |
See all modules Status Using Command Line | |
php bin/magento module:status | |
Enable module Using Command Line | |
php bin/magento module:enable Namespace_Module | |
Disable module Using Command Line | |
php bin/magento module:disable Namespace_Module | |
Uninstall Module Using Command Line | |
php bin/magento module:uninstall Namespace_Module | |
Check Current Mode Using Command Line | |
php bin/magento deploy:mode:show | |
Change To Developer Mode Using Command Line | |
php bin/magento deploy:mode:set developer | |
Change To Production Mode Using Command Line | |
php bin/magento deploy:mode:set production | |
Run the single-tenant Compiler Using Command Line | |
php bin/magento setup:di:compile | |
Unlock Admin User Using Command Line | |
php bin/magento admin:user:unlock adminusername | |
Enable Maintenance Mode Using Command Line | |
php bin/magento maintenance:enable | |
To enable maintenance mode for all clients except 192.0.0.1 and 192.0.0.2: | |
php bin/magento maintenance:enable --ip=192.0.0.1 --ip=192.0.0.2 | |
To clear the list of IPs. | |
php bin/magento maintenance:enable --ip=none | |
Disable Maintenance Mode Using Command Line | |
php bin/magento maintenance:disable | |
Check Maintenance Mode Status Using Command Line | |
php bin/magento maintenance:status | |
Allow IP on Maintenance Mode Using Command Line | |
php bin/magento maintenance:allow-ips --ip=192.0.0.1 --ip=192.0.0.2 | |
Set Magento crontab Using Command Line | |
php bin/magento cron:install --force | |
Use --force to rewrite an existing Magento crontab. | |
To view the crontab, enter the following command as the Magento file system owner. | |
crontab -l | |
Remove Magento crontab Using Command Line | |
php bin/magento cron:remove | |
Pattern to use command on upgradeSetup Upgrade Using Command Line | |
php bin/magento setup:upgrade | |
Static Content Deploy Using Command Line (Use -f for force deploy on 2.2.x or later) | |
php bin/magento setup:static-content:deploy | |
Cache Clean Using Command Line | |
php bin/magento cache:clean | |
Cache Flush Using Command Line | |
php bin/magento cache:flush | |
Magento 2 Module Installation | |
1.First | |
* | |
php bin/magento setup:upgrade | |
2.Check Status: | |
* | |
php bin/magento cache:status | |
3.Enable Module. | |
4.Deploy Module. | |
How to create a module in magento 2?To create Hello World module, you need to complete the following high-level steps: | |
* Step 1: Create the folder of Hello World module | |
* Step 2: Create etc/module.xml file | |
* Step 3: Create etc/registration.php file | |
* Step 4: Enable the module | |
Link: | |
* | |
https://www.mageplaza.com/magento-2-module-development/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment