DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › Composer

How to Patch Drupal Core and Contributed Modules Safely Without Downtime

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Composer to resolve and test Drupal updates away from production, commit the tested composer.lock, deploy that exact lock file, and run database updates and cache rebuilds under a controlled release process. A normal Drupal database update enters maintenance mode, so a literal zero-downtime release requires infrastructure around Drupal: blue-green or rolling traffic management, health checks, and database changes that let old and new application code coexist. Drupal itself does not provide a universal zero-downtime switch.

The safest pattern is therefore a tested, repeatable release rather than running an update command on the live host. You prepare the code and dependency graph on a development or staging copy, exercise real user journeys, back up production, promote the identical build, perform required update hooks, shift traffic only after validation, and keep the previous release and database backup ready for rollback.

As an Amazon Associate I earn from qualifying purchases.

What “without downtime” means for Drupal

There are two different goals that are often conflated:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • No unplanned outage: users may see a short, announced maintenance window, but the release is tested and recoverable.
  • Zero user-visible downtime: requests continue while the new release is prepared and traffic moves between application pools.

Drupal’s documented update procedure puts the site in maintenance mode while code and database updates run. That boundary matters because update hooks can alter schemas, data, caches, or plugin definitions in ways that must not be interrupted. Keeping users online during the whole operation is an infrastructure and database-design problem in addition to a Drupal problem.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

For genuine zero downtime, run a blue-green or rolling deployment: keep the current (“blue”) pool serving requests, build and test a new (“green”) pool, apply compatible schema changes, pass health checks, and shift traffic gradually. During the transition, old and new code must safely use the same database. If an update requires an incompatible schema change, schedule a maintenance window instead of claiming zero downtime.

Before changing a version: inventory and release review

Confirm how the site is managed

Inspect the repository and deployment process first. A Composer-managed Drupal project normally contains composer.json and composer.lock; the lock file records the exact dependency versions that must be promoted. Identify the Drupal major and minor version, PHP version, database engine, web server, enabled modules and themes, and whether configuration management is used.

Sites with Composer-managed third-party dependencies should not have their core or module files replaced by hand. Manual file replacement is appropriate only for a non-Composer site that has no Composer-managed third-party dependencies, and even then it is harder to reproduce and roll back.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

List available updates

On the development or staging copy, run:

composer outdated "drupal/*"

Review each core and contributed-module release note before selecting a version. Check PHP and Drupal compatibility, required dependency changes, update hooks, deprecated APIs, known issues, and whether a theme or another module needs changes for a new core minor release. Resolve existing errors in Drupal’s status report before adding another variable to the release.

Decide whether it is a patch, minor update, or major upgrade

A security or bug-fix patch within the supported compatibility range is usually a normal maintenance release. A core minor update can require contributed modules or themes to change. A major-version upgrade is a separate project: Drupal’s manual-update procedure is intended for the same major version, and major dependency changes normally belong in a major release unless required for security or a critical bug.

Back up for a real rollback

Before modifying production, create and test a restorable database dump and a backup of the files and code that are part of the deployed release. Drupal documents Drush commands such as:

drush sql:dump

and:

drush archive:dump

Keep the previous release directory or artifact, its matching composer.lock, and the backup identifiers together. A code-only rollback is unsafe if update hooks have changed the database; recovery may require restoring both the prior code and the corresponding database state. Record where backups are stored, who can restore them, and how long restoration takes before starting the release.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

The Composer-first release runbook

1. Resolve dependencies in development or staging

Never discover new dependency versions on the live server. For a project using drupal/core-recommended, update core with:

composer update "drupal/core-*" --with-all-dependencies

For a contributed module, substitute its Composer package name:

composer update drupal/modulename --with-all-dependencies

Use --dry-run first when you want to preview the dependency graph and transitive package changes. Review the resulting diff in both composer.json and composer.lock; do not accept unrelated upgrades simply because they appear in the solver output. If the solver proposes a downgrade, a removal, or a new PHP extension requirement, stop and investigate rather than forcing the transaction.

2. Build the exact release artifact

Commit the tested composer.json and composer.lock together with any application code, configuration changes, theme changes, and deployment scripts. Build from that commit so every environment receives the same dependency set. A production install should use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
composer install --no-dev

The install command honors the committed lock file; it does not resolve a newer set of versions. Run it in a clean build environment or release directory, not over the files currently serving requests.

3. Apply database updates and rebuild caches on the test copy

With the new code deployed to staging, run:

drush updatedb

Then rebuild caches:

drush cache:rebuild

If the project uses configuration management, inspect and export the intended configuration changes:

drush config:export --diff

Review the update output for skipped, failed, or destructive operations. Database updates can enable maintenance mode; that behavior is expected during the operation and is one reason a production run must be planned as a controlled release.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

4. Test behavior, not just command exit codes

A successful Composer or Drush exit code does not prove that the site works. Test both anonymous and authenticated journeys that represent how the site is actually used:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Home page, key landing pages, navigation, search, and representative content types.
  • Login, password reset, account editing, permissions, and at least one important authenticated workflow.
  • Forms, file uploads, media handling, emails, payment or identity integrations, and webhooks where applicable.
  • Queues, cron jobs, scheduled tasks, imports, and background workers.
  • Module-specific functions affected by the release, including custom plugins, field widgets, and event subscribers.

Review Drupal’s status report and recent logs for PHP errors, deprecations that became fatal, broken handlers, missing plugins, failed queue items, access errors, and cache warnings. Test with the same PHP extensions, database mode, reverse proxy, and environment variables used in production. A test environment that differs materially from production can hide a release failure.

5. Promote the tested lock file

After testing, promote the same commit or immutable artifact to production. Verify the deployed checksum or commit identifier before running application commands. On the production host or release container, run:

composer install --no-dev

Do not run composer update on production. Updating there can select versions that were never tested and can leave the server with a dependency graph different from every reviewed environment.

6. Run required production update operations

Apply the database updates required by the promoted code, then rebuild caches. If configuration changes are part of the release, import the reviewed configuration through the project’s established process. The exact command sequence depends on the deployment tooling, but the required outcomes are consistent: all update hooks complete, caches are rebuilt, and the active configuration matches the tested release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a conventional single-server deployment, this step normally requires maintenance mode. Announce the window, make the change, and keep it as short as the tested procedure allows. For a zero-downtime architecture, perform schema work in a compatibility phase before switching traffic, as described below.

7. Shift traffic only after health checks

In blue-green or rolling deployment, start new application instances with the promoted artifact and warm their caches. Health checks should cover more than a process responding on a port: verify that Drupal can connect to the database, read required configuration, load a representative route, and reach essential services. Route a small share of traffic first when your load balancer supports it, watch logs and error rates, and then complete the shift.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Keep the old pool available until the new pool has passed the observation period defined by your operations team. Do not terminate it immediately after the first successful page load; delayed queue failures, cron errors, cache stampedes, and integration callbacks can appear later.

8. Verify and record the release

After traffic has moved, repeat the critical checks from staging against production:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Drupal status report has no new errors.
  • Recent logs show no release-related exceptions or missing plugins.
  • Anonymous pages, authenticated journeys, forms, search, uploads, and integrations work.
  • Cron and queues run successfully, and scheduled jobs are not duplicated by multiple workers.
  • Cache headers, reverse-proxy behavior, sessions, and file delivery remain correct.

Record the deployed commit, lock-file hash, database update result, configuration change, monitoring observations, and the point at which rollback is no longer needed. Retain the previous release until the agreed rollback window expires.

Core updates, contributed modules, and major upgrades

Change Composer action Additional review Operational treatment
Drupal core patch or minor update composer update "drupal/core-*" --with-all-dependencies Core release notes; PHP and dependency requirements; module and theme compatibility Test update hooks, caches, configuration, and representative journeys before promotion
Contributed module update composer update drupal/modulename --with-all-dependencies Module release notes, issue queue, schema changes, permissions, plugins, and integration behavior Apply the module’s update hooks, rebuild caches, and review module-specific documentation
Major-version upgrade Not a routine patch command Upgrade path, deprecated APIs, contributed-module availability, PHP and database support Run as a dedicated project with a migration plan, rehearsal, and explicit rollback strategy
Non-Composer site without Composer-managed dependencies Manual file replacement may be used File ownership, removed files, libraries, and update instructions Back up first and use a maintenance window unless an equivalent tested release system exists

Do not treat a major upgrade as a larger version of a patch. Compatibility, data migrations, and contributed-module readiness can require application changes that cannot be safely mixed into a routine release.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to design literal zero-downtime releases

Blue-green deployment

Blue-green keeps the current pool serving while a separate pool is built from the tested artifact. Apply only backward-compatible database preparation while both pools are live, validate the green pool, switch the load balancer, and keep blue available for rapid application rollback. This model offers a clear traffic switch but requires duplicate capacity and reliable session, file, and cache handling.

Rolling deployment

Rolling deployment replaces instances in batches. Remove one batch from service, deploy and warm it, run health checks, and return it to the pool before continuing. The database must support a mixed fleet during the rollout, and the load balancer must stop sending traffic to an instance that fails checks. Rolling releases use less spare capacity than blue-green but make partial-version states last longer and can complicate rollback.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use expand-and-contract schema changes

To let old and new code share a database, separate a schema change into compatible phases:

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
  1. Expand: add nullable columns, tables, or indexes without removing or renaming structures used by the old release.
  2. Deploy compatibility code: write data in a form both versions understand, or dual-write while backfilling.
  3. Backfill and validate: migrate existing rows in controlled batches and monitor locks, replication lag, and application latency.
  4. Switch reads or behavior: enable the new path only after the required data is present.
  5. Contract later: remove old columns or constraints only after the previous code is no longer able to use them.

This pattern is an operational inference from Drupal’s maintenance-mode boundary, not a promise that every module update can be made compatible. If an update hook renames or drops a structure immediately, blue-green traffic shifting cannot make that release safe for simultaneous old and new code.

Control sessions, files, and caches

All application instances must see user-uploaded files through shared or replicated storage, or requests can fail after a traffic switch. Sessions need a shared store or deliberate stickiness; otherwise a user can appear logged out when the next request reaches another instance. Purge or warm reverse-proxy and Drupal caches consistently, and ensure only the intended worker pool runs cron or queue consumers during the transition.

Rollback when a release fails

Application failure before database changes

Stop routing traffic to the new pool and switch back to the previous release artifact. Because the database schema is unchanged, this is usually the fastest rollback. Preserve logs and the failed artifact for diagnosis rather than rebuilding it from memory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Failure after update hooks ran

Do not assume that restoring old code reverses database changes. Follow the tested recovery plan: restore the matching database backup when the data change is incompatible, or use a documented forward fix if the schema was designed for backward compatibility. Drupal’s manual-update guidance treats database and code recovery as a coordinated operation.

Partial or interrupted update

Keep the site in a controlled state, capture the Drush output and database error, and prevent additional traffic from reaching an inconsistent pool. Restore the last known-good code and database according to the runbook, then verify status, logs, caches, queues, and representative user journeys before reopening traffic.

Common mistakes that create avoidable downtime

  • Running Composer update on production: it resolves untested versions and makes the live server differ from the reviewed build.
  • Backing up only the database: code, uploaded files, private files, and configuration can also be required for restoration.
  • Skipping update hooks or cache rebuilds: new schema and plugin definitions may not be active even though new files are present.
  • Testing only an anonymous home page: permissions, forms, queues, integrations, and authenticated paths often expose failures first.
  • Switching traffic before health checks: a running PHP process can still lack database access, configuration, or required services.
  • Calling any traffic shift “zero downtime”: incompatible schema changes still require a maintenance window.
  • Deleting the old release immediately: you lose the quickest application rollback while delayed errors are still emerging.
  • Combining unrelated dependency updates: a smaller, attributable change is easier to test and recover than a broad solver transaction.

Choosing the right deployment model

Decision factor Maintenance-window release Blue-green or rolling release
Availability Users see maintenance mode during database updates Users remain on the old pool while the new pool is prepared and traffic is shifted
Schema compatibility Can tolerate an update that requires old code to stop first Requires expand-and-contract or another design that supports mixed versions
Rollback speed Restore the prior release and, if needed, database backup Switch traffic back quickly for code-compatible failures; database incompatibilities still require recovery
Traffic control One application endpoint is placed in maintenance mode Load balancer or CDN health checks and controlled routing are required
Sessions and caches Fewer concurrent-version concerns Shared sessions, files, cache strategy, and worker coordination must be designed
Operational complexity and cost Simpler and usually cheaper, but includes a planned outage More capacity, automation, monitoring, and expertise are required

Choose the simpler maintenance-window process when the business can tolerate a short, announced interruption or when a module’s database update is not backward-compatible. Choose blue-green or rolling deployment when continuous service is a hard requirement and your team can operate the traffic, schema, storage, and rollback controls it demands.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Composercontributed modulesdeploymentDrupalDrupal coreDrushrollbackzero downtime

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.