Using Magento Open Source maintenance mode safely

Maintenance mode closes the storefront during deployments and fixes. This page covers how to enable it, allow trusted IPs, customize the holding page and avoid stores left offline.

On this page

When Magento Open Source maintenance mode is the right tool for a deployment

Maintenance mode is the right tool when a self-hosted Magento Open Source store must change code or data in a way that could leave customers hitting a broken or half-updated storefront. Typical cases include deploying new code, running bin/magento setup:upgrade after a module change, recompiling generated code, or repairing data while the catalog or orders are being touched. In Magento, maintenance mode works by serving a holding page to storefront visitors while the admin area and any IP addresses you have allowed continue to work. That lets your team verify the change through the admin and a trusted network path before customers return. Confirm the exact commands, flags and the allowed-IP option against the documentation for the version you run, because the syntax has changed across the 2.4.x lines.

Maintenance mode is less suited to changes that do not touch the storefront's database schema, code or cached configuration. A content edit, a price update or a small template fix can often be made with the store live, provided the change is tested on a staging copy first. Ask whether the change is reversible in minutes, whether the store takes orders during the window, and whether any third-party integration (payment, ERP or shipping) will fail or queue messages while the storefront is closed. Those answers decide whether a short closure is worth the lost sales and whether you need a dedicated maintenance window agreed with the business.

Before you rely on the mode, confirm three things with your own team: who is allowed to enable and disable it, which office or agency addresses must be on the allowed list, and whether the holding page content meets your brand and legal requirements. Record the exact check you will run to confirm the store is back in service, because a closure that ends without that check is the most common way a store is left in maintenance. The sections that follow cover the commands, the IP and holding page settings, and how to avoid a stuck store.

Maintenance mode options and when each fits

This table compares the four ways a team can handle planned work on a Magento Open Source store: full maintenance, allowed-IP access, a custom holding page, and no maintenance mode at all. Read each row against your own traffic, staff access needs and tolerance for an offline storefront. The main takeaway is that the lighter the control, the less customers notice, but the more care the change needs.

OptionCustomer impactStaff access and risk of a store left offlineWhen it fits
Full maintenance mode with default holding pageStorefront and checkout unavailable to all visitors during the windowNo one outside the server can reach the store. Highest risk of forgetting to switch it off, so a documented end step is essentialDatabase changes, major upgrades or deployments that cannot safely run against live traffic
Maintenance mode with allowed IP addressesCustomers still see the holding page, while listed office or agency IPs reach the storefrontStaff can test before reopening. Confirm the exact allowed-IP setting and file location for your version in the official documentationPre-launch checks and fixes where your team or agency must verify the live build
Custom holding pageVisitors see your message, timing and contact details instead of the default pageSame access rules as the chosen maintenance mode. Test the page on mobile and confirm it returns the expected status to crawlers and monitorsLonger or public windows where customers need clear information and support routes
Planned window with no maintenance modeStorefront stays open, so changes must not disrupt sessions, carts or ordersStaff work on the live store throughout. Lowest risk of a store left offline, but the highest risk of errors reaching customersContent, configuration or theme changes that do not touch code, database schema or running services
Choosing by change typeSchema, code and data migrations usually need a closed window, while content edits rarely doDecide before the change window opens and record the choice in the change ticketUse your change log to confirm which option was used and who switched it back

How to enable, verify and exit maintenance mode

This sequence takes a store into maintenance mode for a deployment or fix, confirms that trusted staff can still reach it, and returns it to normal service with a recorded check at each stage. The window length must come from your own change plan, so the steps focus on what to confirm before, during and after the work.

  1. Confirm the window and rollback plan

    The change owner confirms the deployment window, the people on call, the approver for any rollback, and the exact trigger that means the team stops and reverts. The window length must come from your own change plan, not from a default in this guide. Record the start time, the expected end time and the rollback steps in the change ticket. Done means an approver has signed off the ticket and the on-call contact has acknowledged it.

  2. Record the current maintenance state

    Before touching anything, an engineer on the release team checks whether maintenance mode is already active on each node by running bin/magento maintenance:status from the Magento root directory as the web server user. Note the result, and also note any existing maintenance.flag file in the var directory. If the store is already in maintenance for an unknown reason, stop and investigate before continuing. Done means the current state is written into the change ticket.

  3. Add trusted IP addresses before enabling

    Collect the public IP addresses of the office, the agency and the testers who must reach the store while it is closed to customers. Add them with bin/magento maintenance:allow-ips using the full list, because this command replaces the existing allowed list rather than appending to it. Confirm each address with the person who owns it, since a wrong address locks out the people who need access. Done means maintenance:status or the configuration shows the list you recorded in the ticket.

  4. Enable maintenance mode

    Run bin/magento maintenance:enable on the target environment, or on every node in a multi-node layout, so no server keeps serving customers. Check that the command reports maintenance as enabled and that maintenance:status agrees on every node. Then load the storefront from a normal customer network and confirm the holding page appears. Done means each node reports the same state and an outside browser sees the holding page.

  5. Run the deployment

    The release engineer runs the planned work, such as code deployment, setup:upgrade, setup:di:compile, static content deployment or database changes, in the order written in the release runbook. Log each command and its exit status in the change ticket. If any step fails, follow the rollback plan rather than improvising a fix on a live store. Done means every runbook step has a recorded success or a recorded rollback decision.

  6. Verify from allowed and outside networks

    Once the deployment finishes but before maintenance ends, a tester connects from an allowed IP address and checks the storefront home page, a category, a product page, cart, checkout up to the payment step, and the admin login. Then a second tester connects from an outside network that is not on the list and confirms they see only the holding page. Record the results for each page. Done means the allowed network reaches the expected pages and the outside network does not.

  7. Disable maintenance mode and check the state

    Run bin/magento maintenance:disable on every node, then run bin/magento maintenance:status on each one to confirm the store is no longer in maintenance. Load the storefront and admin from an outside network, place a test order only if your runbook includes it, and watch the error and system logs for new exceptions during the first minutes of traffic. Remove the temporary allowed IP list if your policy requires it. Done means every node reports maintenance as off, the outside check passes and the change ticket is closed with the final status.

How the holding page, IP allowlist and cache interact

When maintenance mode is on, the storefront and admin stop serving normal pages, but the rest of the stack does not stop with them. Cron jobs and queue consumers run as separate processes on the application servers, so they keep executing unless you stop them. A customer-facing holding page does not pause background work. Staff should expect scheduled tasks, indexers triggered by cron and queued messages to keep running during a window, and should decide in advance whether that is acceptable for the change being made.

The web server and any full-page cache sit in front of Magento and decide what visitors actually see. Adobe documents Varnish as the full-page cache accelerator for self-managed installations, so on a self-hosted store a cached page can be served from Varnish before the request ever reaches the application. Check whether your Varnish configuration passes requests through to the maintenance response, whether it caches the holding page itself, and whether it honors the allowlisted IP addresses you set. A holding page cached with a long lifetime can keep showing customers an outage after the window closes, and an allowlist that Varnish does not see can lock out your own staff.

Test this on a staging copy that matches production's proxy and cache layers, not on a bare application server. Confirm which client IP the application receives behind your load balancer, verify that an allowlisted office address reaches the store while a test address gets the holding page, and request the holding page twice to see whether the cache stores it. Ask your agency or hosting team to document the exact cache rules for the maintenance response and to confirm the cache is purged when maintenance is switched off.

Security risks when maintenance mode is misused

Maintenance mode is a short-term switch, but while it is on, the holding page, the allowlist and the audit trail all become part of your attack surface. The cards below pair each misuse pattern with one control you can check before and after a deployment or fix.

Trusting spoofed client IP headers

Allowlists compare the visitor's address against a list of office or agency IPs. If the web server or application trusts client-supplied forwarding headers, anyone can send a header naming an allowed address and bypass the holding page. Check which proxy addresses your load balancer or reverse proxy sets and confirm that only those hops are trusted when Magento reads the client IP. Test the bypass from an outside network with a forged header.

System requirements

Leaving broad allowlists in place

Allowlists added for one deployment often stay for months and grow to cover whole ranges, VPN pools or contractor networks. Each extra range is a path to the storefront and admin while the rest of customers see the holding page. Keep the allowlist to named addresses for the window, record who added each entry, and remove entries as part of the close-out checklist. Review the list against your current staff and vendor access.

Exposing admin paths on the holding page

A custom holding page is served to anonymous visitors, so anything it links to or reveals is public. Links to admin login paths, internal hostnames, version strings, stack traces or debug output give attackers information they would otherwise have to find. Keep the holding page static, show only a neutral message and an expected return time, and confirm that no template includes admin URLs or environment details. Review the page source after each change.

Forgetting content security policy on holding pages

Content Security Policy headers are supported in Magento Open Source from 2.3.5, and from 2.4.7 the policy runs in restrict mode by default on storefront and admin payment pages. A custom holding page or a maintenance template that loads scripts or styles outside the policy can break in ways that look like a store fault. Test the holding page against the policy on your release line, and keep any inline assets and third-party scripts out of it unless the policy allows them.

CSP documentation

Missing audit trail for maintenance toggles

Maintenance mode changes who can reach the store, so every enable and disable should be attributable. Record the operator, the time, the reason and the allowlist state in your change or ticket system, and keep the server-side log of the command along with the deployment record. Without this, an unexpected outage or an unexplained allowlist cannot be traced. Ask your hosting provider or pipeline team where these events are logged and how long they are kept.

Stores left in maintenance

A store that stays in maintenance mode after a deployment is a failed release that nobody has noticed yet. Automated pipelines can enable maintenance mode and fail before the disable step runs, leaving customers blocked for hours. Add a scheduled check that alerts when maintenance is on outside an approved window, and include the disable step in the pipeline's failure path. Document who owns the alert and the first response.

Questions teams ask before they maintain a store offline

Can a Magento Open Source store run deployments without maintenance mode?

Sometimes, but only when the change is limited to code and static content that the store can serve while files are being replaced. Schema changes, dependency updates and generated code rebuilds can leave a storefront in a broken state for part of the deployment, so most teams still switch maintenance mode on for those steps. The decision depends on what the release touches. Ask your engineers to list every database, code and configuration change, then decide per release whether the window is needed. Record that decision in the release checklist so it is not made from memory each time.

What drives the effort of a safe maintenance procedure?

The effort depends on how many moving parts the store has and how closely they must stay in step during the window. The main drivers are:

  • The number of custom modules, themes and third-party integrations that must be retested after the change
  • Whether the store runs on one node or several, since every node must enter and leave maintenance together
  • How much of the procedure is scripted, including the commands for enabling, upgrading and disabling maintenance mode
  • Whether a rollback path exists and has been rehearsed on a non-production copy
  • How long the store has to stay closed to customers, which sets the pressure on the work

The more of these that are manual, the more time the team needs to verify each step.

What must our team provide before a partner can plan maintenance work?

Your team should provide read access to the codebase and deployment pipeline, a description of the hosting layout, and a list of the office and agency IP addresses that need access during maintenance. You should also share the current change calendar, the list of integrations that call the store during the window, and the owners who can approve a rollback. Access to a staging environment that mirrors production is essential for rehearsal. Documented contact points for payment, ERP and shipping vendors help the partner plan any notices or pauses those services need.

Can an internal team handle maintenance mode without outside help?

Yes, many internal teams do this well once the procedure is written down and rehearsed. The work is mostly disciplined execution: a checklist, the correct commands, a verification step and a tested exit. Outside help is most useful when the store is heavily customized, runs across several nodes, or the team has not yet built a repeatable release process. Ask whether your team has the staff to cover deployments outside business hours and whether anyone besides the usual operator can run the steps during an incident.

How do we stop a store from being left in maintenance mode?

Make the exit step part of the same script or runbook as the entry step, and never treat them as separate tasks. Add a verification check that loads the storefront and admin from outside the office network after the window closes. Monitor the maintenance flag through your existing alerting so a store left closed raises a notice quickly. Assign one named person to confirm the exit, and log who switched maintenance mode off and when. Rehearse the exit on staging so the team knows the command and its result before it matters in production.

What will a partner confirm first before maintenance work begins?

A partner will normally confirm the exact Magento Open Source version and the hosting topology, since these decide which commands and checks apply. Next, they will review which releases currently run maintenance windows, how rollback works, and whether any integrations hold data that could be lost during a closed period. They will also check how the holding page and allowed IP list are managed. Confirm the Magento version against Adobe's released versions and system requirements pages before planning, because supported PHP, database and search versions differ by release.

Does maintenance mode affect what customers and security reviewers see?

Yes. A holding page is visible to shoppers, so its wording, branding and the status it returns affect trust and search behavior. Security and compliance reviewers will also ask how the holding page is controlled, who can edit it, and whether allowed IP addresses are reviewed. Confirm with your security team which controls apply to the admin and storefront during the window, and document the approved holding page text before it is needed.

Decision path for enabling and leaving maintenance mode

The path starts with confirming that the change needs a closed storefront at all, since some deployments can run without maintenance mode. If a window is needed, allowed IPs are added before maintenance mode is enabled, so the office or agency team can verify the change while customers see the holding page. After the deploy, the team verifies the store and then either disables maintenance mode or rolls back. The check that matters most is the failure branch, which must lead back to disabling maintenance mode so the store does not stay closed.

Decision path from confirming the change to leaving maintenance mode, including the failure branch.

What DeployOpen delivers when we manage the maintenance procedure

When DeployOpen manages the maintenance procedure, the written maintenance runbook is the central deliverable. It sets out, step by step, how the team enables maintenance mode for a deployment or fix, which commands run in which order, who approves the window, how the store is checked before the holding page is removed, and who is called if a step fails. For a self-hosted Magento Open Source store, the runbook also names the environment each step applies to, because the production, staging and any multi-node servers may need different handling. The runbook is written around the team's own deployment tooling and server layout, and it is agreed in writing before work starts as part of a fixed-scope engagement.

A second deliverable is the review of the allowlist of IP addresses that may reach the storefront and admin while maintenance mode is on. The review covers which office, agency and monitoring addresses are listed, who owns each one, how the list is updated when those addresses change, and how the list is removed from the procedure so it does not persist into normal operation. DeployOpen also reviews the holding page content, including the wording shown to shoppers, any status or timing message, and whether the page reveals internal details. The scope of this review, and any changes to templates or content, are defined in the written scope rather than assumed.

The engagement also includes a verification checklist for the team to run at the end of each window. Typical items are confirming that the store is out of maintenance mode, that the admin login and checkout work, that cron and queue consumers have resumed, and that the intended code or configuration change is live. The checklist is written so the on-call engineer can run it without the author present. Whether these items fit a given store depends on its architecture, so the team should confirm the checklist content against its own environment during scoping.

How DeployOpen works on this

DeployOpen plans and runs Magento Open Source maintenance windows inside your own infrastructure, from the holding page and allowed IP list to the verification and cleanup that follow each deployment. The work is agreed in writing before it starts, so your team knows exactly which maintenance steps are covered and who executes them.

How we scope

  • Written scope lists which deployments, fixes and maintenance windows the engagement covers for your store.
  • We record the office and agency IP addresses allowed through maintenance mode and who approves changes to that list.
  • Scope names the holding page content, languages and any storefront pages that must stay reachable during work.

How we build

  • We script the enable and disable steps for maintenance mode and test them on a non-production copy of your store.
  • We configure the allowed IP list and holding page template in version control so changes are reviewed before release.
  • We check that cron, indexers and queue consumers resume correctly after each window and document what to inspect.

How we hand over

  • You receive a runbook covering the maintenance commands, allowed IP handling, rollback steps and log locations to check.
  • We walk your deployment and operations staff through a dry run so they can enable and disable maintenance themselves.
  • Documentation includes a check for stores left in maintenance, with the alert or review step your team should own.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering maintenance procedures as the store changes.
  • Retainer scope is agreed in writing, including who responds when a window overruns and how the holding page is updated.
  • We retest maintenance procedures after Magento Open Source patch upgrades to confirm the steps still behave as documented.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.