I have a basic website set up in magento 2 platform and it is on AWS server. I need to keep the site under construction. How can I achieve that using Admin panel?


2 Answers 2


There is no way to enable maintenance mode from the admin panel. You'll need to login to your server via SSH and do the following:

  1. Login to your server using a terminal via SSH ex. ssh [email protected]

  2. If necessary, switch to the user that has file ownership of your Magento project ex. su magentousername

  3. Change directories to your Magento project bin folder ex. cd /path/to/magento/bin

  4. Run the following command to enable maintenance mode: php magento maintenance:enable

  5. Clear your cache using the following command: php magento cache:flush

Try reloading your site and it should now display Magento's default maintenance page.

If you want to customize how the maintenance page looks, here is another answer explaining how to do that: What is the easy way to edit the maintenance / error 503 page?


You can set via ssh or php bin/magento maintenance:enable
OR create empty .maintenance.flag file in var directory.

It will enables maintenance mode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.