Mautic upgrades from the command line and Composer

Mautic 5.0 and later update only from the command line, so each upgrade needs a restored and tested backup, the right install-method commands and a planned rollback. This page explains the sequence and what drives effort.

On this page

Why Mautic upgrades now run from the command line

From Mautic 5.0, you can no longer update in the browser. Every upgrade is now a server-side job: you plan it, back up the installation, run the update commands at the command line and check the result. For a self-hosted team, that moves upgrade ownership from a button in the admin interface to a change window your own engineers run. The first question to settle is which install method you use, because it decides the commands you run. Package installs use the php bin/console mautic:update commands, while Composer installs change package versions in composer.json and then run composer update. Confirm which method your instance was built with before you schedule anything.

The reason to keep up matters as much as the method. Mautic's stated cadence is monthly patch releases, minor releases every three months and major releases every two years, so a team that waits for a convenient moment can fall several releases behind quickly. Support dates also differ by line. According to the Mautic releases page, Mautic 6.0 receives security support until 30 September 2026 and Mautic 5.2 until 30 June 2026, while Mautic 7.2 has active and security support until 30 September 2026 and Mautic 7.3 is planned as the long-term support release with security support through 31 December 2027. Check the current table on the releases page before you choose a target, since planned dates can move.

Two controls come before any command runs. First, take a tested backup: the Mautic update guide expects both files and database to be restored and checked in a test environment, so you know the restore works before you need it. Second, run every update step as the web server user, such as www-data, so that files written during the update keep the ownership and permissions the web server expects. Running as root is a common cause of permission faults that surface only after the site is live. Ask your team who owns the backup restore test, which account runs the commands and where the change record lives. Those three answers decide whether an upgrade is routine or an incident. Keep the sequence in a written runbook and rehearse it on a copy of production before the live window.

What changes in the upgrade path from Mautic 5.0 onward

This table compares what changed from Mautic 5.0 onward for self-hosted installs, what each change means for the upgrade work, and what your team needs to do. Read each row against the release notes for your target version, because the facts behind this table cover the upgrade method and support dates, not every code-level change. The main takeaway is that browser updates are gone, so every upgrade needs a tested backup and a command line run as the web server user.

ChangeImpactAction needed
Browser updates removedUpdates from 5.0 onward must be run at the command line, so browser-based upgrade steps in old runbooks no longer apply.Rewrite the upgrade runbook around the command line and retire any browser update steps.
Package install update commandsNon-Composer installs use mautic:update:find, mautic:update:apply and mautic:update:apply --finish, run from the Mautic root.Run these as the web server user, such as www-data, to keep file permissions correct.
Composer update methodComposer installs back up composer.json and composer.lock, change Mautic package versions to the target, then run composer update --with-dependencies.Confirm the target versions in composer.json, then finish with bin/console mautic:update:apply --finish.
Tested backup requiredThe update guide requires files and database to be restored and checked in a test environment before any update.Schedule a restore test on a copy and record the result before the production window.
PHP 8.2 to 8.5 for 7.xMautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5, so older PHP versions block the upgrade.Check the PHP version on the server and plan any PHP upgrade before the Mautic upgrade.
npm from 5.0 onwardnpm is required from Mautic 5.0, so hosts without it fail the build or asset step.Confirm npm is installed and matches the environment used for the build before updating.
Support end for 5.2Mautic 5.2 (Capella) receives security support until 30 June 2026.Plan the move off 5.2 and confirm the current support status on the releases page.
Support end for 6.0Mautic 6.0 (Tabit) receives security support until 30 September 2026.Schedule the 6.0 to 7.x path and check plugin compatibility on a copy first.
Support end for 7.2Mautic 7.2 (Absolunto) supports PHP 8.2 to 8.5 with active and security support until 30 September 2026.Confirm whether 7.3, the planned long-term support release, fits your upgrade calendar.

How to prepare a tested backup before any update

This sequence gives you a backup you have proven can be restored and run, so that a failed upgrade has a known rollback point. Mautic's update guide requires that check before any update starts, and the steps below show how to build it.

  1. Inventory the install method and version

    Record whether the instance was installed from the production package or with Composer, and note the exact Mautic version, PHP version, database engine and web server currently running. The sysadmin or platform engineer who owns the server should capture these from the live environment, not from memory or old runbooks. The step is done when the inventory sits in the change ticket and someone other than the author can confirm it matches the server. This record decides which update path you follow later.

  2. Inventory custom plugins and themes

    List every custom or third-party plugin and theme in the installation, with its source, version and whether it was patched locally. Check which of them have a compatibility statement for the target release, and ask the plugin authors or your developers to confirm it in writing. Flag anything that is no longer maintained, because that becomes a blocker to plan before the window opens. The step is complete when each item has an owner and a compatibility status, even if that status is unknown.

  3. Copy the files and database

    Take a copy of the full application directory, including local configuration and any custom code, and a consistent dump of the Mautic database taken while the application is quiet or in maintenance mode. For Composer installs, include composer.json and composer.lock in the copy. The person running the backup should store both in a location separate from the production server and record checksums or file sizes. The step is done when both artifacts exist off the server and their integrity is recorded.

  4. Restore to a separate test environment

    Restore the copied files and database onto a test server that matches production as closely as your environment allows, including PHP version, extensions, web server and domain settings where practical. Keep the test environment off the public internet and disable outbound email and integrations so that test runs do not send messages or write to live CRM systems. The step is done when the restored copy starts and the restored database is readable from the application. Note any differences from production that could affect results.

  5. Run the instance and test key workflows

    Log in to the restored instance and check that the core functions your team relies on still behave as expected. Typical checks include user login, a sample of contact records, segment membership, a campaign with a test contact, form submissions, and any integration sync you can run safely in isolation. Your marketing operations lead should sign off on the list before testing begins. The step is complete when each check has a recorded pass or fail result and failures are logged for triage.

  6. Record the rollback point

    Write down the exact backup identifier, the file and database locations, the Mautic and PHP versions it represents, and the steps needed to restore it onto production. Confirm that the person responsible for the rollback can access the backup and has the credentials and permissions to use it. The step is done when the rollback procedure has been walked through by a second person and the backup is confirmed readable. This record is what makes a failed update reversible within the change window.

What to inventory before the upgrade

A Mautic upgrade from the command line only goes as well as the inventory behind it. The six areas below cover what your install depends on, where each fact lives, and what to confirm before a test copy is ever updated.

Install method and Composer files

Confirm whether the install is a package install or a Composer install. Composer installs carry composer.json and composer.lock in the project root, and those two files decide how the upgrade is run. Record the current Mautic package versions listed in composer.json, and copy both files somewhere safe before any change. A package install has no such files to edit, so the upgrade path is different. Mixing the two methods is a common cause of a failed update.

Mautic update docs

PHP and database versions

Compare the running PHP version and extensions against the requirements for your target release, not the release you run today. Mautic 7.0 accepts PHP 8.2 through 8.5 and MySQL 5.7 or higher with InnoDB, or MariaDB 10.2 or higher. Confirm the versions with php -v and the database server's version query, and check the web server user's PHP configuration, since the CLI and the web server can load different settings.

Mautic requirements

Plugins and themes

List every installed plugin and custom theme, and record the source and version of each. Third-party plugins often lag behind a new Mautic release, and a plugin that fails after the update can block the finish step. Ask each plugin vendor or your developers for a version that supports the target release, and confirm it in a test copy before the production window. Note any custom code that changes Mautic core files, because the update can overwrite or conflict with those edits.

Cron jobs and the messenger consumer

Export the crontab for the web server user and note every Mautic job, including segment updates, campaign updates, campaign triggers and the broadcasts command. Mautic's documentation says these jobs should be staggered, so record their current schedule. If you queue email, confirm the messenger consumer is running and how it is supervised. Decide whether jobs pause during the update, and document how they restart afterward so that campaigns do not fire twice or stall.

Mautic cron jobs docs

SAML single sign-on configuration

If users sign in through a SAML identity provider, export the current SAML settings and the attribute mapping. Mautic expects the identity provider to send email, first name and last name attributes, so confirm that claim names still match after any identity provider change. Record the certificate expiry dates and the admin fallback account. The docs describe no LDAP option, so a directory-based login must be confirmed separately before you rely on it after the upgrade.

Mautic authentication docs

Test environment and verified backup

Build a test environment that matches production in PHP version, database engine, web server and file layout, then restore a full backup of files and database into it. Check that the restored copy logs in, sends a test email and runs the cron jobs. Mautic's update guide requires this tested backup before any update, so the test copy is the gate for the production change. Keep the backup until the upgraded system has run through a full campaign cycle.

Command line steps for package installs versus Composer installs

Package installs are Mautic installations that were set up from the production package with the web or command-line installer, not through Composer. The update runs entirely through Mautic's own console commands, so the work is a short sequence of discovery, application and finish steps. Each command must run as the web server user, such as www-data, so that any files the update creates or replaces keep the ownership the web server expects.

  • Find the target release: Run php bin/console mautic:update:find from the Mautic root to see which update Mautic offers for this installation.
  • Apply the update: Run php bin/console mautic:update:apply as the web server user. This step replaces the application files for the target release.
  • Finish the update: Run php bin/console mautic:update:apply --finish to complete database and post-update tasks.
  • Keep the user consistent: Use a command such as sudo -u www-data php bin/console ... for each step, rather than running some steps as root and others as the web server user, since mixed ownership is a common cause of errors on later page loads.
  • Check before you proceed: Confirm that the target release is the one you tested on a restored copy, because the update finder reports what Mautic offers, not what your organization approved.

After each step, check that files under the Mautic directory, including the cache and log folders, are owned by the web server user. Confirm that the application loads and that the version shown matches the target before you start the next step.

Upgrade sequence with checks and rollback points

This sequence turns a Mautic upgrade into a repeatable change with a verified backup, a rehearsal on a test copy, and a named rollback point at each stage, so the production window only repeats steps already proven on a copy.

  1. Confirm the tested backup exists

    Before any command runs, confirm that a backup of the application files and the database exists and that it has been restored and checked in a separate test environment. The person who owns the instance signs off on this. For Composer installs, also save copies of composer.json and composer.lock. The step is done when the restore test has logged in to the admin area, loaded a contact record and a campaign, and the backup set is labeled with the current Mautic version. Without this proof, there is no rollback point, so stop here if any part is missing.

  2. Rehearse the full upgrade on a test copy

    Build a copy of production from the verified backup, point it at a non-production mail transport and disconnect it from live CRM and SMS integrations, then run the complete upgrade sequence there first. Check plugin and theme compatibility, the admin login, cron jobs, the queue worker and a sample send to an internal test address. Record every error and the exact commands that worked. The step is done when the rehearsal finishes cleanly and the recorded command list is the one used for production.

  3. Put the production instance in maintenance

    Schedule the change with the business owners of campaigns and forms, and announce the window. Pause or disable campaign sends and broadcasts, and stop or pause cron jobs and the messenger consumer so no background work runs against files or the database mid-upgrade. Take a fresh backup immediately before the change, since contacts may have changed since the verified backup. The step is done when the scheduled jobs are confirmed stopped and the fresh backup has been checked for completeness.

  4. Run the install-method update commands as the web server user

    For package installs, run php bin/console mautic:update:find, then mautic:update:apply, as the web server user such as www-data. For Composer installs, change all Mautic package versions in composer.json to the target, then run composer update --with-dependencies, also as the web server user so that file ownership stays correct. Review any dependency conflicts before continuing. The step is done when the commands exit without errors and the new version is reported. If a command fails, stop and move to the rollback step rather than retrying in place.

  5. Run the finish command and clear caches

    Run bin/console mautic:update:apply --finish as the web server user to complete database migrations and post-update tasks. Then clear the cache using the standard Mautic console command and confirm the file ownership of the installation directory still matches the web server user. The step is done when the finish command reports completion and the application loads its home page without PHP or database errors in the web server and Mautic logs.

  6. Verify login, cron jobs, queue and a sample send

    Log in to the admin area with a named administrator account and confirm that the version shown matches the target. Confirm that cron jobs for segment updates, campaign updates and campaign triggers are running again, staggered as the documentation describes, and that the broadcasts command and messenger consumer are processing. Send a sample email to an internal address through the production transport and confirm delivery and tracking. The step is done when all four checks pass and their results are written in the change record.

  7. Decide on rollback or sign-off

    Set explicit pass criteria before the window opens, such as login, cron execution, queue processing and the sample send all succeeding. If any criterion fails and cannot be fixed within the agreed window, roll back by restoring the saved application files, including composer.json and composer.lock where relevant, and the database from the pre-change backup, then confirm the restored instance with the same checks. If all criteria pass, re-enable campaigns and broadcasts, lift maintenance, and keep the pre-change backup for the agreed retention period. The step is done when the change record shows either sign-off or a completed, verified rollback.

How to test an upgrade and roll it back safely

Treat the upgrade as finished only when the copy you tested has passed a checklist of working functions, and keep the rollback path as a rehearsed procedure rather than a theory. Start with login: confirm that local users can sign in and that, if you use SAML single sign-on, the identity provider still sends the email, first name and last name attributes Mautic expects. Then check that the web interface loads without errors and that the version reported matches your target release. Run php bin/console mautic:update:find again after the update to confirm there is nothing left to apply, and confirm mautic:update:apply --finish completed without errors in the log.

Next, verify the scheduled work that moves contacts and sends mail. Trigger or wait for the cron jobs that update segments, update campaigns and process campaign triggers, and confirm they run in the staggered order your cron configuration sets. Send a test broadcast through the broadcasts command to a seed segment, and if email is queued, confirm the messenger consumer is running and draining the queue. Check the HubSpot or Salesforce plugin by pushing one test contact and confirming it appears on the CRM side. Finally, exercise every custom plugin and theme you maintain, since the update may change behavior that no core test covers. Ask your team or partner to list those checks in writing before the upgrade so the sign-off is objective.

Rollback means restoring the tested backup of both files and database, then confirming the restored instance behaves as it did before the upgrade. Because the backup must already have been restored and checked in a test environment, the restore steps are known and the time they take is measured. Rehearse the full rollback on the test copy, including restoring the database, reinstating the Composer files from the saved composer.json and composer.lock, and checking file ownership under the web server user. Record who decides to roll back, what triggers that decision, and how long the business can tolerate queued email or stopped campaigns. Confirm with your hosting team that the backup location is reachable during an incident, and treat the rehearsal as incomplete until the restored copy passes the same checklist.

What makes a Mautic upgrade take longer

This table lists the factors that most often lengthen a command-line or Composer upgrade of self-hosted Mautic, why each one adds work, and what to do about it before the window opens. Read it as a checklist: the drivers that apply to your installation set the scope you should ask a partner or your own team to estimate.

DriverWhy it adds workHow to reduce it
Custom plugins and themesEach in-house plugin or theme must be checked against the target release, and code that depends on changed internals may need edits before it runs.Inventory every plugin and theme with its owner, then keep a short compatibility checklist for each one.
Composer dependency conflictsChanging Mautic package versions and running composer update can pull in conflicting or changed third-party dependencies, which blocks the install until resolved.Run composer update against a copy of composer.lock first and record every conflict before the production window.
Database sizeMigrations run against the full schema, and a large contact or event table lengthens the backup, the restore test and the update itself.Confirm backup and restore times on a copy of the production database and plan the window from those measurements.
Cron jobs and queue workersSegment updates, campaign triggers, broadcasts and messenger consumers must be stopped, checked and restarted in the right order, and each one is another place a job can fail.List every scheduled job and worker, note its user and command, and document the restart order in the runbook.
Integrations that need re-testingCRM and other plugin connections, such as HubSpot or Salesforce, must be confirmed to still sync after the update, and each one needs a test record and a checked result.Keep a test script for each integration covering create, update and failure cases, and run it on the test environment.
PHP version gapA large difference between the current PHP version and the target release's requirement can mean PHP itself must be upgraded and tested before Mautic can move.Check the target release's PHP requirement now and sequence any PHP upgrade as a separate, earlier change.
Test environment availabilityWithout a test copy of files and database, the team cannot prove the backup works or catch breakage before production, so the work moves into the live window.Build a test environment that mirrors production files, database and web server user, and keep it refreshed for each update cycle.
File ownership and web server userRunning commands as the wrong user can leave files with incorrect permissions, which means a second pass to repair them and a slower recovery if the update fails.Write the exact commands to run as the web server user, such as www-data, and check file ownership before and after each step.

Questions teams ask before upgrading Mautic themselves

Can our team run a Mautic upgrade without outside help?

Yes, if your team has someone comfortable with the command line, file permissions and a PHP stack, and time to test before touching production. Since Mautic 5.0 the browser update is gone, so every upgrade runs through php bin/console mautic:update commands on the server. The harder part is rarely the commands themselves. It is proving the upgrade on a restored copy of your files and database, checking plugins and integrations, and knowing who signs off. If those three things are covered internally, a self-run upgrade is a reasonable choice. If no one on the team has run a Mautic update before, a partner can run the first one alongside your staff so the knowledge stays with you.

What does an upgrade cost, and what drives that cost?

Most of the cost is labor, not software, because Mautic has no paid edition of the software itself. Cost depends on how many installs you run, whether they are Composer or package installs, how many custom plugins, themes and integrations need checking, how much test infrastructure you must build, and how many environments such as staging or production must be updated. Ask any partner for a fixed-scope quote that lists each of those items as a separate line, and confirm whether the quote includes the backup restore test, post-upgrade checks and a rollback plan. Ongoing retainers for later upgrades are a separate cost you should request in writing.

How long does a Mautic upgrade take?

The duration depends on the drivers that set the work size, not on a fixed number. The main ones are the number of installs, the distance between your current version and the target, the state of your custom plugins and themes, the size of your database, and how long your test restore takes. Cron jobs and queue workers also need to be stopped and restarted in a controlled order, which adds time on a busy instance. Ask for a timeline that separates the backup and restore test, the staging upgrade, the production window and the post-upgrade monitoring period, so you can see where the time goes.

What does the work need from our team?

The work needs four things from your side. First, administrative access to the server and the Mautic admin area, with a named account for the work. Second, a test copy, meaning a restored backup of files and database in a separate environment where the upgrade can be run and checked. Third, a list of custom plugins, themes and integrations, including CRM and email connections. Fourth, a named approver who can accept the upgrade and schedule the production window. Without a named approver, the test results have nowhere to go and the production change tends to stall.

Do we need to move to a Composer install before upgrading?

Not always. Package installs can be upgraded with mautic:update:find, mautic:update:apply and mautic:update:apply --finish, run as the web server user such as www-data. Composer installs follow a different sequence: back up composer.json and composer.lock, change the Mautic package versions to the target, run composer update --with-dependencies, then finish with bin/console mautic:update:apply --finish. If your install is an older package layout that the target release no longer supports, a migration to the Composer-based setup may be needed first. Check the current install method against the target release requirements before scheduling the work, and confirm the path in the official update guide for your version.

What happens if a Mautic upgrade fails?

A failed upgrade is recoverable only if you have a tested backup. Mautic's update guide requires a backup of files and database that has been restored and checked in a test environment before any update, so the rollback path is the restored copy you already proved works. The team should record the previous version, keep the backup until the new version is accepted, and know which commands were run and in what order. Common failures include file permission errors from running commands as the wrong user, plugin incompatibilities and cron or queue jobs running against a half-upgraded codebase. Ask any partner to describe their rollback steps and who makes the call to roll back.

How do we ask a partner for a fixed-scope quote?

Send a short written brief that lists each Mautic install, its current version, its target version, its install method and the plugins, themes and integrations it uses. Add the environments you have, your backup and hosting setup, and the access you can provide. Ask for deliverables and timelines in writing, including the backup restore test, the staging run, the production window, post-upgrade checks, documentation and any retest. Request the assumptions behind the price and what would change it. DeployOpen plans most engagements as fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that written scope.

How the backup, update and rollback phases fit together

The sequence starts with an inventory of the install method, then a tested backup of files and database that is restored to a test copy before anything changes in production. The install method decides the update path: a package install runs the mautic:update commands, while a Composer install updates the package versions and runs composer update first. Every path ends with mautic:update:apply --finish and a verification step, after which the team either promotes the update or returns to the saved files and database. Check that every command runs as the web server user.

Update path from inventory and backup through install-method branch to promotion or rollback.

What DeployOpen delivers for a Mautic upgrade

A fixed-scope Mautic upgrade from DeployOpen starts with an inventory of what the instance actually runs: the Mautic release and PHP version, whether the install is a package install or a Composer install, installed plugins and themes, cron jobs, the messenger consumer, and the SSO and email transport settings. That inventory sets the scope and feeds a written plan that names the target release, the steps, the owners and the acceptance checks before any work begins. The work runs inside your own cloud accounts, data centers or air-gapped network, so the database, files and credentials never leave your environment. Confirm in the written scope which Mautic release line and PHP version the target requires, since those set the plugin checks and the sequencing.

Delivery then follows a tested path. DeployOpen restores a recent backup of files and database into a test copy, runs the php bin/console mautic:update:find, mautic:update:apply and mautic:update:apply --finish sequence (or the Composer equivalent) as the web server user, and records every command and output in a runbook your team can repeat. A verification checklist covers login through your SSO provider, contact and segment counts, campaign and cron health, outbound email, form submissions and plugin behavior. A rollback plan states the backup to restore, the restore order and the decision point at which the team reverts. Handover includes the runbook, the checklist results, the rollback record and notes on what your team should monitor after go-live.

Upgrade support and retesting are available as retainers, which suit teams that expect the next patch, minor or major release to arrive on the same cadence. Ask any provider for the written deliverables, the test environment they will use, who holds the backup and who signs off the cutover. DeployOpen does not hold Mautic partner status or any certification for this work, so the scope relies on the documented procedure and your environment, and it should be confirmed in writing before work starts.

How DeployOpen scopes, delivers and supports Mautic upgrades

DeployOpen plans Mautic upgrades from the command line and Composer as written, fixed-scope work inside your own infrastructure. We take a tested backup first, run the update steps as the web server user and document the result so your team can repeat the process on the next release.

How we scope

  • We confirm your install method, Mautic version, PHP version and target release line before quoting.
  • The written scope lists which plugins, themes and custom code are checked against the target release.
  • We agree in writing who restores the backup, who signs off the test copy and who approves the production window.

How we build

  • We restore your files and database into a test environment and check the copy before any update runs.
  • We run the mautic:update commands for package installs, or update composer.json and composer.lock for Composer installs.
  • Every command runs as the web server user, such as www-data, and file permissions are checked afterward.

How we hand over

  • You receive a runbook with the exact commands, backup locations, rollback steps and post-update checks we used.
  • Test results from the copy environment are recorded so your team can compare them with the production outcome.
  • Your team reviews and signs off the handover before the engagement closes, with open issues listed by owner.

How we support

  • Ongoing upgrades, cron and queue checks, and continuous testing are available as a retainer.
  • A retainer can cover the next patch, minor or major release, scheduled against the release dates Mautic publishes.
  • Support scope and response arrangements are written into the retainer agreement, and quotes follow from that written scope.

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.