Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Maintenance Mode Command Laravel Package

wp-cli/maintenance-mode-command

Enables, disables, and checks WordPress maintenance mode from the command line using WP-CLI. Manage the .maintenance file with simple commands, optionally adding a custom message or retry interval, without touching the dashboard or filesystem manually.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Framing correction: despite the "Laravel/PHP package" label, this is a WP-CLI bundle command for WordPress — not a Laravel package. There is no service provider, facade, config file, or publishable asset. Its entire surface is three subcommands (activate, deactivate, status) executed by the wp binary. The integration boundary for a Laravel shop is therefore a shell invocation in a deploy pipeline, not a PHP API call.

  • Architecture fit: Adjacent, not in-stack. It belongs to the WordPress side of the estate (marketing site, blog, headless content source). Mechanically it creates/removes the .maintenance drop-in in the WordPress root and reads it back to report status. Execution is process-local CLI; there is no daemon, queue, or HTTP layer to hook into.
  • Integration feasibility: High and cheap. Install via wp package install (or rely on bundle inclusion) with a pinned version, then call wp maintenance-mode activate --path=... from an Artisan command, a Deployer/Envoyer step, or a GitHub Actions job over SSH. The contract is exit code plus STDOUT — nothing more.
  • Technical risk: Low in code, moderate in operations. The command is small and boringly correct; the risks are environmental — WP-CLI presence and version parity, filesystem writability, ephemeral containers, multisite scope, and a site stranded in maintenance if the pipeline aborts mid-run.
  • Ecosystem risk: 11 stars and 0 dependents means no third-party validation and no vendor fallback. The release date of 2026-10-30 is future-dated, which is a data-quality flag — verify against Packagist before pinning. Mitigant: the underlying behavior is a file write, so we can reimplement it in ~20 lines if upstream stalls. That caps the downside.
  • Key questions: How many WordPress sites are in scope, and do they deploy through our pipeline? Is maintenance mode the correct primitive, or should 503s be served at the edge (Cloudflare/ALB) for high-traffic properties? Do we need scheduled windows with auto-expiry? Is any site multisite? Do we run WordPress on ephemeral pods where a file-based flag won't persist or be seen? What ad-hoc method (touch .maintenance, a plugin toggle) does this replace?

Integration Approach

Two-plane model. The Laravel plane installs nothing: it gets a thin wrapper — an Artisan command or deploy hook with a timeout, exit-code mapping, and structured logging. The WordPress plane gets WP-CLI with this package pinned in the CLI's composer.json (or a pinned wp-cli version if bundled).

  • Stack fit: Treat it as an operational CLI dependency, same category as rsync or wp db export. Never add it to the application's require block; it does not belong in vendor/ for runtime use.
  • Migration path: Inventory → baseline → replace. Locate every existing maintenance toggle (shell scripts, plugin settings, manual touch), standardize on one command wrapper, then deprecate the ad-hoc paths. Measure success as "zero hand-edited .maintenance files."
  • Compatibility: Decouple upgrade cycles — the PHP version constraint that matters is WP-CLI's, not the Laravel app's. Test multisite behavior rather than assuming it; the file's scope under multisite is the kind of detail that surprises people at 2am.
  • Sequencing: (1) confirm wp is reachable and version-consistent on every target; (2) pilot on one low-traffic site with manual activate → status → deactivate; (3) build the wrapper with a guaranteed deactivate in a trap/finally and a hard maximum maintenance window; (4) wire into the deploy pipeline behind an approval gate; (5) feed status into monitoring; (6) roll out site-by-site behind a flag.

Operational Impact

  • Maintenance: Low churn, but we own the pin and the upgrade cadence. Upstream enforces WP_CLI_CS with PHPCS, PHPStan, Behat, and PHPUnit on every PR — a good signal for a small utility. Note the full composer test installs WordPress per scenario and takes tens of minutes; budget CI time only if we fork.
  • Support: Community, best-effort, small contributor pool. Assign an internal owner (platform/DevOps) and keep an exit plan documented. The escape hatch is genuinely cheap, which is the strongest argument for adopting a low-star dependency here.
  • Scaling: Linear with site count — one file write plus a WP bootstrap per invocation. Parallelize across sites; the only real cost is SSH fan-out and WP-CLI bootstrap latency. This is a deploy-time tool, so request-time throughput is a non-issue.
  • Failure modes, ranked: (a) stuck in maintenance after an aborted deploy — mitigate with a guaranteed deactivate plus a watchdog that asserts status is inactive; (b) filesystem not writable or ephemeral (read-only root, multi-pod) — the flag won't persist or won't be observed, so use edge config instead; (c) multisite scope surprises; (d) parsing human-readable output instead of exit codes — avoid; (e) version drift between developer laptops and CI.
  • Ramp-up: Near-zero for anyone with WP-CLI familiarity; roughly half a day for a Laravel-only engineer to learn the WordPress root layout, .maintenance semantics, and the wp-config/DB prerequisites. Ship a one-page runbook: activate, verify via status plus a curl for 503, deactivate, escalate.

Recommendation: Adopt as a narrow, version-pinned operational utility if WordPress sits in the estate; do not model it as a Laravel dependency or a platform capability. The opportunity: 65 reads as headroom for a wrapper, a runbook, and a stuck-site watchdog — not as a reason to build anything on top of it.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package