HostOnNet Blog

magento 2

magento 2 comes with command line tool, to get list of all commands, run

php bin/magento list

Magento 2 by default run in “production” mode. On this mode, it won’t show any errors, it write to log file in var/logs folder. When you debug a site, its better enable developer mode, so it just display the errors.

php bin/magento deploy:mode:set developer

To set magento 2 to run in production mode

php bin/magento deploy:mode:set production

Here is some other useful commands

php bin/magento setup:upgrade
php bin/magento cache:flush
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento setup:di:compile

Change Magento 2 URL


Posted in Linux