Disable the frontend in Magento 2 for using only the Admin and the API routes.
This was forked from abelbm/magento2-disable-frontend
Install Disable Frontend for Magento2
- Download the extension
- Unzip the file
- Create a folder {Magento root}/app/code/FocusriteNovation/DisableFrontend
- Copy the content from the unzip folder
$ composer require focusrite-novation/magento2-disablefrontend
$ php bin/magento module:enable FocusriteNovation_DisableFrontend
$ php bin/magento setup:upgrade
$ php bin/magento cache:flush
$ php bin/magento setup:di:compile
Stores > Configuration > Advanced > Admin > Disable Frontend