Can we set developer to production mode on the local server?
Magento 2.x Php 7.x
Yes, you can change the mode from developer to production on the local server.
Please run the following command:
php bin/magento deploy:mode:set production
You can refer the Magento developer documentation here
Yes you can set production mode on local
Use below command
clear the contents of following directories:
var/cache var/di var/generation var/view_preprocessed pub/static
Display the current mode
php bin/magento deploy:mode:show
Change to production mode
bin/magento deploy:mode:set production
Change to developer mode
bin/magento deploy:mode:set developer