I am sharing some magento 2 useful commands here:
Magento 2 Upgrade Command:
php bin/magento setup:upgrade
Magento 2 reindex Command:
php bin/magento indexer:reindex
Magento 2 flush cache Command:
php bin/magento cache:flush
Magento 2 static content deploy Command:
php bin/magento setup:static-content:deploy
Magento 2 check developer mode Command:
php bin/magento deploy:mode:show
Magento 2 set developer mode Command:
php bin/magento deploy:mode:set developer
php bin/magento deploy:mode:set production
Magento 2 static content deploy Command if get memory error:
php -dmemory_limit=6G bin/magento setup:static-content:deploy
Magento 2 Disable module command:
php bin/magento module:disable Module_Name
Magento 2 enable module command:
php bin/magento module:enable Module_Name
Magento 2 command to find the all disabled/enabled module command:
php bin/magento module:status
0) Verify, Are content of js/css files is cached in a browser?
1) Install xdebug and try to debug pub/static.php
2) I am using www-data groups and magento user and 777 for static files.
3) see 2). Do not use root
to run static files deploy and do not run it in developer mode. Also, you need clean pub/static folder after setup:static-content:deploy
running, because its break automatic redeploy.
4) It looks right
Best Answer
I configured "PHP Remote Debug" in PHPStorm and just add XDEBUG_CONFIG before script to start debugging.
like
XDEBUG_CONFIG=idekey=phpstorm bin/magento setup:upgrade