sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install nodejscd /var/www/htmlGoes to the correct folder. (Replace with the folder that contains your application.)
chmod -R 777 pub/ generated/ var/Set rights very loosely so that won’t be an issue (which is often is).
php bin/magento module:statusGet list of available modules and their enabled/disabled status.
php bin/magento module:enable Vendor_ModuleEnables a specific module.
php bin/magento module:disable Vendor_ModuleDisables a specific module.
php bin/magento deploy:mode:show
php bin/magento deploy:mode:set productionSets production mode. This compiles certain files that it does not in developer mode. Useful when you miss specific JavaScript files like jquery-storageapi. You can set it back to developer mode after the files are compiled.
php bin/magento dev:template-hints:enableEnable template hints. Unlike n98-magerun2, this applies to all stores.
rm -rf pub/static/* var/view_preprocessed/*Clear processed views. Needed when overwriting module specific CSS for the first time (for example).
php bin/magento setup:static-content:deploy -fDeploy static files. Appears to only do the default locale for some reason. If you want to deploy for another locale, add it to the instruction specifically.
grunt exec
grunt less
grunt watchStart Grunt task that will watch Less file changes. The first two can be done theme specific.
kill -9 $(ps -aux | grep "[g]runt" | awk '{print $2}')Kills any Grunt task that might be running. (You can exit with Ctrl + C if you have Grunt running in a terminal, but this is not always the case.)
php bin/magento setup:upgradeTODO: Description.
php bin/magento indexer:reindexFixes indexes.
php bin/magento setup:di:compileCompile code.
php bin/magento cache:clean
php bin/magento cache:flushClean the cache.
composer updateUpdate the project.
php bin/magento admin:user:create --admin-user='username' --admin-password='strong-password' --admin-email='[email protected]' --admin-firstname='John' --admin-lastname='Doe'Add new admin user (when locked out).
php bin/magento admin:user:unlock _username_php bin/magento --version