How to switch a store from the developer mode to production?

bin/magento deploy:mode:set production

http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-mode.html#change-to-production-mode

See also: