Switch a legacy Mautic install to Composer

Moving a ZIP-based Mautic install to Composer rebuilds the codebase and leaves the database untouched. Here is what maps cleanly, what drives effort, and how to cut over without losing contact data.

On this page

Why a ZIP-based Mautic install needs a Composer switch before the next upgrade

If your Mautic installation was deployed from the ZIP package, you will need to move its codebase to the Composer-based setup before you can rely on current releases and the Mautic Marketplace. The switch rebuilds the code on a Composer project created with composer create-project mautic/recommended-project in a new directory, and it leaves the database untouched. Your contacts, segments, campaigns and history stay where they are, so the work is a code rebuild plus a careful reconnection of the existing database and configuration, not a data migration.

The documented reasons are practical. Composer became the default method for installing and updating Mautic with Mautic 5, partly because ZIP installs caused installation and update errors, and ZIP installs are incompatible with the Marketplace. The Mautic switching guide sets out the official steps. Treat the move as a prerequisite to your next upgrade, because an update path built around ZIP files is the one most likely to fail when you try to move to a newer release line.

Effort depends mainly on how far your install has drifted from the stock package: custom themes, plugins, local code edits, the PHP version and the web server configuration. Before you start, confirm with your team which of these exist, check that your target release supports your PHP and database versions on the Mautic requirements page, and take a full database and file backup. Ask any partner for a written inventory of custom code and a rollback plan, since those two items determine most of the schedule.

What carries over unchanged and what needs rework during the switch

This table maps each part of a ZIP-based Mautic install to what happens during the move to Composer. Because the database is kept, data items carry over, while codebase-level items such as custom themes, plugins, configuration and server settings need checking against the new code.

ComponentCarries over unchangedNeeds rework or checking
Database and contact dataContacts, segments, campaigns and history stay in place because only the codebase changesConfirm the database is reachable from the new directory and that the same connection settings apply
Segments and campaignsDefinitions and their stored state remain in the databaseTest one campaign and one segment after the switch to confirm they still run
Configuration fileStored values such as site URL and database credentials can be reusedCompare against the new template, since keys may be added or renamed in the new release
Custom themesTheme files are copied into the new codebaseCheck them against the new release's template structure and fix any broken overrides
Plugins copied by handCode remains on disk until it is movedConfirm each plugin's compatibility with the target release and reinstall through Composer where possible
Marketplace pluginsInstalled plugins are declared in the project definitionAdd them through Composer and verify their versions match what the release supports
Cron jobsScheduled entries can stay if the paths are unchangedUpdate paths to the new console command location and confirm the schedule is still staggered
Web server and PHP settingsDomain and TLS settings may remain on the hostPoint the document root to the new public folder and confirm the PHP version meets the target requirements
File ownership and permissionsMedia and cache folders may keep their existing ownersSet ownership on the new directory so the web user can write to cache, logs and media paths

Documented commands and paths used to rebuild the codebase

The documented route is a fresh Composer project in a new directory, with the existing database kept as it is and the old configuration carried across. The cards below map the primary Mautic guides to the steps a team runs in order, and the checks that show each step worked.

Switching guide as the primary route

The Mautic switching guide is the reference for moving a ZIP-based install to Composer. It starts from composer create-project mautic/recommended-project in a new directory, so the legacy files stay in place until the new codebase is verified. Read it against your current release line before running anything, because the steps assume the database is untouched. Confirm the exact release version the command will install, since the switching guide is versioned on the docs site.

Switching guide

Why Composer is the documented default

The switching guide explains that Composer became the default install and update method with Mautic 5. ZIP installs caused installation and update errors and are incompatible with the Mautic Marketplace. This matters for the project because a Composer-based codebase is the only path to Marketplace plugins and to the documented update commands. Teams should record this reason in the change request so reviewers understand why the codebase is being rebuilt rather than patched.

Pointing the new codebase at existing data

The documented steps keep the database and point the new codebase at it through the existing configuration. Copy the configuration file from the legacy install into the new project, then confirm the database host, name, user and table prefix match what the legacy instance uses. Nothing in the database is rebuilt during this step, so check the connection before you start any upgrade work.

Update guide for later changes

The Mautic update guide covers how the Composer-based install is updated after the switch. Use it to plan the first update on the new codebase, including the commands that run database migrations and cache clearing. Keep the update guide open during cutover so the post-switch update path is known before it is needed, and confirm which release line you intend to stay on.

Update guide

Verifying the switch before cutover

Verification is the team's responsibility, because the guides describe the steps but not your environment. Check that the web root serves the new codebase, that the admin login works against the existing database, and that contacts, segments and campaigns load unchanged. Confirm that cron jobs and the message queue still point at the correct project path, since legacy cron entries often reference the old directory.

Keeping the legacy install for rollback

The new codebase is built in a separate directory, so the legacy files remain available for rollback. Keep a verified database backup and the legacy directory until the new install has run through a full cycle of campaigns and cron jobs. Ask your team to confirm the backup restore procedure with the operations owner before cutover, since the database is shared between the old and new codebases.

How the switch runs from inventory to decommissioning the old folder

The sequence moves the codebase to a Composer build while the existing database stays in place, and it ends only after a rollback period confirms the new installation is healthy.

  1. Inventory the current release and extensions

    Record the installed Mautic version, the PHP and database versions in use, every plugin and theme in the ZIP folder, and any local code changes or custom files. Confirm the target release against the supported release line and the requirements page before building anything. The step is done when the team holds a written inventory that the rest of the sequence can check against, and when each plugin has been confirmed as compatible with the target release or flagged for replacement.

  2. Back up the database and the existing files

    Take a full database backup and a copy of the current installation folder, including the configuration file and the media and upload directories. Store both outside the web root and confirm the backup restores on a separate host or database name. The step is done when a test restore has completed and someone other than the person who made the backup has confirmed the restored copy opens and lists contacts.

  3. Build the Composer codebase in a new directory

    Create a new project directory with Composer using the recommended project template, as the switching guide describes, and leave the ZIP folder untouched. Add the plugins and themes the inventory confirmed, then apply configuration and file carry-over: the local configuration file, custom media, and any changes that the team has verified are still required. The step is done when the new directory builds without errors and the web server can serve its login page against a staging copy.

  4. Test the new build against a copy of the database

    Point the Composer build at a restored copy of the production database, never at the live database, and run the upgrade and cache steps the update guide describes. Test sign-in, contact search, segment counts, campaign editing, email sending to internal test addresses, and the plugin integrations that the business depends on. The step is done when the test log lists each check as passed or as an issue with an owner and a fix.

  5. Schedule the cutover and freeze changes

    Choose a maintenance window with the marketing and operations owners, pause scheduled campaigns and imports that would write to the database during the switch, and agree who signs off on the result. Prepare the cutover steps as a written checklist, including the point at which the old and new directories are swapped and the rollback steps. The step is done when the stakeholders have approved the window and the checklist, and the freeze is confirmed in the team's change record.

  6. Cut over and verify cron jobs and queues

    Switch the web server document root to the new directory, apply the final database changes that the update guide requires, and confirm the cron jobs for segment updates, campaign updates, campaign triggers and broadcasts point to the new installation. Confirm that the messenger consumer is running when emails are queued and that the jobs are staggered as the cron documentation recommends. The step is done when a sample segment update and a queued email both complete and the job logs show no errors.

  7. Hold the rollback period and monitor

    Keep the ZIP folder and the pre-cutover backup in place while the new build runs real campaigns, imports and integration traffic. Review application and web server logs, failed jobs and bounce reports each day with the operations owner, and record any issue that would justify a rollback. The period ends when the owner agrees the new build has run its normal workload without unresolved defects.

  8. Decommission the old ZIP folder

    After the rollback period closes, remove the old installation folder from the web root and the cron and service definitions that still point to it, then store the final backup under the retention policy the organization applies to marketing data. Update the runbook so future updates follow the Composer process. The step is done when no service references the old path and the runbook and backup location are recorded in the change log.

What makes the switch quick or slow for a given install

This table lists the factors that move the effort of a ZIP-to-Composer switch, who typically pays for each one, and whether the cost is one-time or recurring. Read it against your own install to see which rows push your estimate up. The main takeaway is that the database stays untouched, so most of the variable effort sits in version distance, custom code, cron and hosting layout, and testing.

FactorWhy it changes effortWho paysOne-time or recurring
Current Mautic versionDistance from the target release line determines how many upgrade steps and database migrations must run before or after the switch. Confirm the path with the release notes before scheduling.Internal staff time for planning, partner scoping if the gap is largeOne-time
PHP and database versionsMautic 7.0 requires PHP 8.2 to 8.5 and MySQL 5.7 or higher with InnoDB or MariaDB 10.2 or higher. Hosts below these levels need a platform change first.Hosting team or provider for runtime upgradesOne-time for the upgrade, recurring for ongoing patching
Custom code and pluginsCustom themes, plugins and patched core files are rebuilt into the new codebase. Each one needs a compatibility check against the target release.Internal developers or partner engineers for rework and testingOne-time, with ongoing maintenance for each custom component
Number of hosts and cron entriesWeb, worker and cron roles may sit on separate machines, each with its own copy of the code and crontab. Every host must be repointed to the new code path.Internal platform or ops staffOne-time to repoint, recurring to monitor
File ownership and web server layoutDocument roots, symlinks, writable folders and the web server virtual host often differ between installs. Ownership errors are a common cause of failed switches.Internal sysadmin time, sometimes hosting provider supportOne-time
Testing scopeThe team must decide how much to verify: login, campaigns, email sends, cron runs, integrations and tracking. Wider scope adds time but reduces rollback risk.Internal QA and business owners, optional partner testingOne-time per switch, recurring if tests are kept for future upgrades
Backup and rollback readinessA verified database backup and a retained copy of the old codebase make recovery possible. Teams without these tend to add time to the plan.Internal ops or hosting providerOne-time setup, recurring backup cost

What usually goes wrong during a Composer switch and how to prevent it

A Composer switch replaces the codebase while the database stays in place, so most failures come from the seams between old and new: the backup, the configuration, the add-ons, the scheduled jobs, the file system and the cutover itself. Each risk below has a prevention step you can verify before the change window opens.

Unverified database backup

The database is the one thing the switch is designed not to touch, so it is also the one thing you cannot rebuild if something goes wrong. Take a full database dump before starting, store it outside the Mautic server, and confirm it restores into a separate scratch database. Record the exact Mautic version in use before the switch so you know which release the codebase must match. A backup that has never been restored is an assumption, not a recovery plan.

Mismatched configuration file

The local.php configuration file holds database credentials, mailer settings, the site URL and the secret used for encryption. If it is copied from the old folder without checking, the new codebase may point at the wrong database or fail to decrypt stored credentials. Compare the old and new configuration side by side, keep the secret value unchanged, and confirm the database host, name and user match the backed-up instance before the first page load.

Plugins that fail to install under Composer

Plugins and themes installed by copying folders into the ZIP-based tree may not register under a Composer project, and some have dependencies that Composer resolves differently. Inventory every installed plugin and theme with its source and version, confirm each one has a Composer-compatible release for your target Mautic version, and test each one on a staging copy. Anything without a verified path should be deferred or replaced before cutover, not discovered afterward.

Cron jobs and consumers left on the old folder

Segment updates, campaign triggers, broadcasts and the messenger consumer are started by commands that reference a specific installation path. If they still point at the old folder after cutover, they can keep running against stale code or stop silently. Update every scheduled entry and any process manager unit to the new project path, stagger the cron jobs as the project documents, and check the job logs after the first full cycle.

Mautic cron jobs docs

File permission errors

The web server user must be able to read the new code and write to cache, logs and media directories, while the rest of the tree should not be writable by it. Composer runs as the user who executes it, so files created by a root shell can block the web server on its first request. Run the install and cache steps as the same service user the web server uses, check ownership on the new directory tree, and confirm that log and media writes succeed before opening the site.

Cutover without a tested rollback

A switch that cannot be reversed in minutes turns a failed check into an outage. Keep the old ZIP-based folder in place and unchanged, and decide in advance which step returns traffic to it, such as repointing the web server document root and the cron entries. Rehearse that rollback on staging, time it, and agree the go or no-go criteria with the people who own the site. Because the database is shared between both codebases, only roll back to a release that can read the current schema.

Questions teams ask before switching Mautic to Composer

How much does it cost to switch a legacy Mautic install to Composer?

The cost depends mainly on how many environments you run, how much custom code or plugins you depend on, and how much testing your team needs before cutting over. No price figure is supplied for this work. The cost is usually one-time for the rebuild and test cycle, while hosting and ongoing maintenance recur regardless of the install method. When you request a quote from DeployOpen, ask for the scope in writing, including which environments are covered, which plugins are checked, and what testing and rollback steps are included. Fixed-scope engagements are agreed in writing before work starts.

How long does a Composer switch take?

Duration is driven by the size of the codebase, the number of custom changes and plugins to reconcile, the number of environments, and how quickly your team can review and approve test results. No duration has been supplied for this work, so treat any timeline as something to confirm against your own environment. The core technical step is building a new codebase from the Composer project template in a new directory while the existing database stays in place. Ask for a timeline that separates staging validation from production cutover.

What does our internal team need to provide?

Your team usually needs to supply access to the server, database credentials for a non-production copy, a list of installed plugins and custom code, web server and PHP configuration, and the cron jobs currently running. Someone must also own the decision to cut over and be available to test campaigns, forms, and email sending after the change. Mautic depends on cron jobs for segment updates, campaign updates and campaign triggers, so the owner of scheduled jobs should be part of the review. Confirm these responsibilities before the project starts.

Can our team switch Mautic to Composer without a partner?

Yes, if your team has experience with PHP applications, Linux server administration, and the Mautic release process. The official switching guide and update guide set out the steps, and that is the right starting point for an in-house attempt. A partner adds value when the instance has custom code, several environments, strict change control, or a limited window for cutover. Assess your team's capacity to test campaigns, email, and integrations, not only to run the commands.

Is our contact data at risk during the switch?

The switch changes the codebase, not the database. The official guide states that switching to a Composer-based installation changes only the codebase and starts from a new directory, so the existing contact records should remain in place. Risk still exists from configuration errors, file ownership problems, or a failed cutover, so take a full database backup and a copy of the files before starting. Test the new installation against a copy of production data first, and confirm your backup restores cleanly.

What happens to our campaigns and segments after the switch?

Because the database is kept, campaigns, segments, forms, and contact records should carry over, since they are stored in the database rather than in the codebase. Verify this rather than assume it: after cutover, check that segment membership updates, campaign triggers fire, and scheduled broadcasts run. Those jobs depend on cron entries and workers, so a misconfigured schedule can make campaigns appear to stop even when the data is intact. Review the official switching and update guides for exact steps and checks.

Which Mautic version and PHP requirements should we confirm first?

Confirm your target release line and the PHP and database versions it requires before you rebuild. Mautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5, MySQL 5.7 or higher with InnoDB or MariaDB 10.2 or higher, and a supported web server. Also check support dates for your target release, since Mautic 5.2 receives security support until 30 June 2026 and Mautic 6.0 until 30 September 2026. Confirm these against the official requirements and release pages before scheduling the work.

Does the Composer switch need downtime?

Some downtime or a maintenance window is common, because the application files change and cron and email workers must be stopped or paused during cutover. The length depends on your hosting setup and how much testing happens before the final switch. Ask whether the plan uses a parallel directory and a short cutover, and how rollback works if a check fails. Confirm the approach with your operations and marketing teams so that scheduled sends are paused during the window.

How the old ZIP folder, new Composer build and shared database fit during cutover

The cutover starts with a backup of the existing ZIP-based folder and its database. A new Composer project is built in a separate directory with composer create-project mautic/recommended-project, and the configuration is carried over into it. Both codebases point at the same database, which is not modified by the switch. Before the old folder is removed, check that cron jobs and the messenger consumer run from the new directory and that the instance behaves correctly.

Phases of the cutover, with the database shared across both codebases.

What to confirm with the vendor and in your own environment before starting

Before you schedule the switch, fix the exact target release line and read its support dates on the Mautic releases page. Mautic 7.2 (Absolunto) 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. Your current version matters too: Mautic 6.0 receives security support until 30 September 2026, Mautic 5.2 until 30 June 2026, and Mautic 4.4 has paid Extended Long Term Support through 31 December 2026. Pick the release line you will run for the next planning period, then confirm its PHP, database and web server requirements against the official requirements page rather than against what the current server happens to run. Do not assume the existing PHP or MySQL version still qualifies. Confirm the PHP range, the MySQL or MariaDB minimums, and whether npm is needed on your build host for that release.

Next, confirm the hosting type. The project states that Mautic should not be installed on shared hosting and recommends a VPS or dedicated server. If the legacy install runs on shared hosting, the move to Composer is the wrong moment to change hosting silently, because Composer needs shell access, a PHP version you control and the ability to run the Composer and cron jobs. Check that you can run Composer from the command line, that the web root and the Mautic media and var directories are writable by the correct user, and that your cron entries can be reproduced exactly in the new directory.

Finally, inventory every custom plugin, theme and form hook. The switch rebuilds the codebase, so anything copied from the old plugins or themes folders must be checked against the target release before you rely on it. Ask each plugin vendor or internal developer whether it supports the target release and whether it is available through the Marketplace or must be installed as a local package. Record the answers in writing, because the cutover plan depends on them.

How DeployOpen scopes and delivers a Mautic Composer switch

DeployOpen starts every Mautic Composer switch with a written scope agreed before any work begins. The scope names the current Mautic version, the PHP and database versions in use, the web server, the cron and queue setup, and the custom code, themes and plugins that must survive the move. Before the rebuild, the team inventories what the current ZIP-based install actually contains, including anything edited directly in the app or media folders, local overrides, and plugins that were installed by hand rather than through the Marketplace. Each item is marked as carried over, replaced by a supported package, or retired, so the client approves the outcome before the codebase changes.

The codebase is then rebuilt in the client's own infrastructure from composer create-project mautic/recommended-project in a new directory, and the custom pieces are reapplied on top of it. The existing database is not altered by the rebuild, but DeployOpen tests the switch against a copy of that database in a non-production environment. The test run covers login and SSO if configured, segment and campaign updates, the broadcast and messenger jobs, email sending through the configured transport, and any CRM plugin sync. Confirm with the vendor which post-switch checks the installed release requires, since the switching guide and the update documentation are the references for that sequence.

Cutover is planned as a short, scheduled window with a rollback path. The original ZIP files, a full database backup and a copy of the configuration are kept until the client signs off that the new install behaves correctly. DeployOpen supports the cutover itself and the rollback window that follows, and hands over a runbook covering the cron schedule, file ownership and the steps for reverting. Once the switch is complete, keeping Mautic on a supported release line is a recurring task. Teams that want that handled continuously can cover ongoing upgrades under a DeployOpen retainer, with the scope and frequency agreed in writing.

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.