Common Magento 2 terminal commands after installation or migration

Common Magento 2 terminal commands after installation or migration

Use the following commants on Magento 2 terminal
/www/server/php/74/bin/php  -d memory_limit=-1  bin/magento setup:upgrade
/www/server/php/74/bin/php  -d memory_limit=-1  bin/magento cache:clean
/www/server/php/74/bin/php  -d memory_limit=-1  bin/magento indexer:reindex
/www/server/php/74/bin/php  -d memory_limit=-1  bin/magento setup:static-content:deploy
/www/server/php/74/bin/php  -d memory_limit=-1  bin/magento setup:static-content:deploy -f
If your php is not default you need to find the PHP path first.
Al Mahbub Khan
Written by Al Mahbub Khan Full-Stack Developer & Adobe Certified Magento Developer

Full-stack developer at Scylla Technologies (USA), working remotely from Bangladesh. Adobe Certified Magento Developer.