-1

This question already has an answer here:

So I'm very new to Magento. I've the version 2.1.1 installed and I was wondering if someone could give me detailed step by step instructions to put my store in maintenance mode?

marked as duplicate by Qaisar Satti, Raphael at Digital Pianism, Marius Sep 6 '16 at 8:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

-1

There are 2 ways of maintenance as i know from my self.

  1. From Admin Panel

  2. Redirect from your index.

First way is common:

Enable or disable maintenance mode

Magento uses maintenance mode to disable bootstrapping; for example, while you’re maintaining, upgrading, or reconfiguring your site.

Magento detects maintenance mode as follows:

If var/.maintenance.flag does not exist, maintenance mode is off and Magento operates normally. Otherwise, maintenance mode is on unless var/.maintenance.ip exists:

var/.maintenance.ip can contain a list of IP addresses. If an entry point is accessed using HTTP and the client IP address corresponds to one of the entries in that list, then maintenance mode is off.

Command usage:

magento maintenance:enable [--ip= ... --ip=] | [ip=none] magento maintenance:disable [--ip= ... --ip=] | [ip=none] magento maintenance:status where

--ip= is an IP address to exempt from maintenance mode (for example, developers doing the maintenance). To exempt more than one IP address in the same command, use the option multiple times.

Using --ip= with magento maintenance:disable means only that you're saving the list of IPs for later use. To clear the list of exempt IPs, you can use magento maintenance:enable --ip=none or see Maintain the list of exempt IP addresses. magento maintenance:status displays the current status of maintenance mode.

For example, to enable maintenance mode with no IP address exemptions:

magento maintenance:enable To enable maintenance mode for all clients except 192.0.2.10 and 192.0.2.11:

magento maintenance:enable --ip=192.0.2.10 --ip=192.0.2.11

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