Magento Commands

Installing the module

Now that the module is code-complete, run the following commands to install it:
  1. bin/magento module:status - This command shows a list of enabled/disabled modules.
  2. bin/magento module:enable MyCompany_ExampleAdminNewPage - If necessary, run this to enable the disabled module.
  3. bin/magento setup:upgrade - This command will properly register the module with Magento.
  4. bin/magento setup:di:compile - This command compiles classes used in dependency injections.
Mode Set:
php bin/magento deploy:mode:set developer
 php magento deploy:mode:set production