Mautic campaign import and export: when teams move campaigns between instances
A campaign built on a staging or test instance has to reach production eventually, and sometimes a campaign needs to be copied to a second instance for a different brand, region or team. Mautic's campaign export and import is the mechanism for that move. The Mautic documentation recommends importing ZIP files created by Mautic's own export function, because those files carry the campaign data along with the external assets and dynamic content the campaign depends on. Importing a campaign built by hand or assembled from outside sources is a different task, and it is where missing assets and broken references tend to appear.
Teams usually need this when marketing operations builds and tests flows on a non-production instance, when a template campaign is reused across brands or regions, or when a campaign is rolled back and rebuilt. Before you plan the move, confirm three things with your own environment: that the source and target run the same Mautic release line, that the segments, forms, emails and custom fields the campaign references already exist on the target, and who approves the change in production. Dynamic content and assets carry the most risk, since they may point to URLs or file paths that differ between instances. Export files also contain marketing logic and possibly personal data references, so treat them as internal material under your normal change control.
Campaign transfer is one capability among several that a self-hosted Mautic deployment needs to plan. The import and export path depends on the installation, the cron jobs that drive campaign triggers, the mail transport and the roles that decide who may import into production. Decide early whether the move will run through the interface, the command line or the API, since the documentation covers all three. The Mautic importing campaigns documentation sets out the supported formats and steps, and it is the right reference to confirm against the release you run.
Choosing the import route: interface, command line or API
This table compares the three routes Mautic's documentation describes for importing campaigns: the interface, the command line and the API. Read each row against your own team's access and release process, since the right route depends on who needs to run the import and how often. The main takeaway is that the interface suits one-off moves, while the command line or API suits repeatable promotion between environments.
| Factor | Interface | Command line | API endpoints |
|---|---|---|---|
| Accepted input | ZIP files only | ZIP files and correctly structured JSON | ZIP files and correctly structured JSON |
| Best fit | Occasional import of a single campaign by a marketer or admin | Scripted promotion from staging to production on a server you operate | Pipeline-driven promotion from a CI system or release tool |
| Who runs it | A Mautic user with campaign import permission | An operator with shell access to the Mautic server | A developer or pipeline with API credentials |
| Server access needed | No | Yes | No |
| API credentials needed | No | No | Yes |
| Repeatable pipeline | No | Yes | Yes |
| Main risk | Manual steps and no record of who ran the import | Running against the wrong instance if paths are not checked | Credentials stored in pipeline tools must be scoped and rotated |
| What to confirm | The exact import permission your role needs in your version | Command name and options for your release line in the Mautic docs | Endpoint names, payload format and authentication method for your version |
How to export from staging and import into production
This sequence moves a tested Mautic campaign from a staging instance into production as a structured package, so the production copy arrives with its assets and dynamic content and stays inactive until the target is ready to run it.
Export the campaign from staging
Someone with campaign permissions on the staging instance opens the campaign and uses Mautic's export function to create a ZIP file. Export from the Mautic export function rather than building the package by hand, because the docs recommend ZIP files created this way, since they include campaign data, external assets and dynamic content. Record which campaign version was exported and the staging instance it came from, so the production copy can be traced back later. Done means you hold one ZIP file with a clear name and date.
Review the ZIP contents before transfer
Open the ZIP file and confirm it contains the campaign data, the external assets and the dynamic content the campaign depends on. Check that the asset files and any referenced content are present, and note any items that point to staging-only URLs, test lists or internal identifiers. Remove or flag credentials, personal data and test contact records before the file leaves the staging environment. Done means you have a short list of items to replace or recreate on production.
Prepare dependent items on production
On the production instance, create or confirm the items the campaign relies on, such as segments, forms, emails, custom fields, tags, stages and points, using the same names the campaign expects. Replace staging-only URLs and sender details with production values. Confirm that the team member who will activate the campaign has the right role. Done means each dependency from your review list exists on production and is recorded.
Import through the chosen route
Import the ZIP file through the Mautic interface, which accepts ZIP files only, or through the command line or API endpoints, which can also accept correctly structured JSON files. Choose the route your team can run and audit, and keep a record of who ran it and when. Watch for import errors and capture any messages in full. Done means the import finishes without errors and the campaign appears in the production campaign list.
Verify structure, assets and dynamic content
Open the imported campaign and compare its canvas with the staging version, checking each decision, action, wait and source. Confirm that emails, assets and dynamic content blocks resolve to the production items you prepared and that no link still points to staging. Test any conditional branches with a test contact on production. Done means the structure matches the approved design and every item resolves without errors.
Confirm cron jobs before activation
Before activating the campaign, confirm that the cron jobs for campaign updates and campaign triggers are running on the production server, and that the jobs are staggered as the documentation advises. Without them, contacts will not move through the campaign. Check the job logs or scheduler output for recent successful runs. Done means you have evidence that the campaign jobs ran on the target within the last scheduled cycle.
Activate the campaign on production
Once cron jobs are confirmed, publish the campaign on production and record the activation time, the approver and the segment it will process. Watch the first processing cycle and the contact counts entering the campaign, and compare them with what the design expects. Confirm that unsubscribe and consent settings in the imported emails are the production settings. Done means the campaign is active, the first cycle has processed contacts as expected and the activation record is complete.
Security and operational risks when moving campaigns
Campaign ZIP files and API imports move more than workflow logic. They can carry asset links, personal data, embedded content and live triggers, and each one affects a different part of your production instance. The cards below cover what to review before a campaign reaches production and who should approve the move.
Review exported file contents
An exported ZIP can include external assets, dynamic content and campaign data that point to URLs or embedded material from the source instance. Check every asset URL and embedded element for links to staging hosts, test domains or third-party resources you have not approved. Confirm whether any exported content includes contact or personal data before the file leaves the source environment, and remove anything that should not travel.
Exporting campaigns docsScope API import credentials
Importing through the command line or API requires credentials with permission to create campaigns. Use a dedicated API user with the narrowest role that allows campaign import, rather than a personal administrator account. Confirm how API access is granted, rotated and revoked in your Mautic version, and log which account performed each import so changes can be traced.
Apply change control to production imports
A campaign import changes live marketing behavior, so treat it as a production change. Record the source export, the target instance, the person who approved the import and the rollback steps before running it. Import first into a staging instance that matches production configuration, check the result, and only then repeat the import in production during an agreed window.
Check triggers before activation
Campaigns depend on cron jobs for campaign updates and triggers, so an imported campaign with active triggers can start acting on real contacts as soon as the scheduled jobs run. Review each trigger, segment reference and action, including emails and CRM pushes, before the campaign is published. Confirm the cron schedule on the production server so you know when the first contact evaluation will happen.
Cron jobs docsMatch references to the target instance
Imported campaigns can refer to segments, forms, emails and custom fields by identifiers that exist in the source instance. Those references may point to the wrong object or fail after import if the target has different IDs or names. Compare referenced items in the target instance after import, and confirm that any integration actions still point to the correct connected service.
How campaign import fits a staging and production workflow
Once staging and production are separate Mautic instances, campaigns stop being something a marketer builds directly in production and become artifacts that move between environments. Treat an exported campaign ZIP as a release candidate: it is built and reviewed in staging, then imported into production through the same steps every time. The export carries campaign data, external assets and dynamic content, so what a reviewer tests in staging is the structure that production receives. Changes made by hand in production after the import will not be in the staging copy, so decide early which instance is the source of truth and enforce that rule with your team.
Campaign import is only one part of the deployment path. Both instances should be installed the same way, using the Composer-based setup that the Mautic installation docs recommend since version 4.0, so that packages, dependencies and upgrades follow one procedure. The release line of staging and production should also match. If staging runs a newer minor release, a campaign that works there may behave differently after import into an older production install, so plan upgrades so that staging is moved first and production follows on the same line. Confirm the supported release dates for each line on the Mautic releases page before setting this schedule.
An imported campaign only runs if the background work behind it is running. Mautic relies on cron jobs for segment updates, campaign updates and campaign triggers, and it needs a messenger consumer when emails are queued. Check that these jobs are configured and running on each instance, including staging, because a test campaign that never fires there will hide real problems until production. Ask the team that owns each environment to confirm the cron schedule and the queue worker state as part of every import checklist, and record the result alongside the exported ZIP.
Campaign import questions buyers ask before hiring help
How much effort does moving a single Mautic campaign take?
Effort depends less on the file itself than on what the campaign touches. A campaign that only sends emails and uses a few segments is quick to move, while one that depends on custom fields, forms, dynamic content, external assets or third-party plugins needs each dependency checked in the target instance. The main drivers are the number of decision branches, how many segments and emails it references, whether assets are bundled in the export, and how many integrations or plugins must exist on the receiving side. Ask any partner to list each dependency before quoting, because unlisted dependencies are where most extra time appears.
Can our team import a campaign without outside help?
Yes, a team with Mautic administration experience can usually handle a simple import alone. Mautic imports pre-configured campaigns from ZIP files, and the documentation recommends ZIP files created by the export function because they carry campaign data, external assets and dynamic content. Outside help is most useful when the campaign spans several instances, relies on custom fields that differ between staging and production, or must be checked against consent and suppression rules before any contact receives a message. Decide early who owns the target instance so that the import does not become a shared, unowned task.
What does the work need from our side?
Plan to provide access to both the source and target instances, a staging environment that mirrors production's custom fields, plugins and email transport, and a set of test contacts that cover each segment branch. You will also need a named approver who signs off on the imported campaign before it is activated, and someone who can confirm that cron jobs for campaign updates and triggers are running on the target. Without those inputs, the team can verify only the structure of the campaign, not how it behaves with real contact data.
How long does a rerun take after fixing an import?
A rerun is shorter than the first pass only when the fixes are contained. Re-importing a corrected ZIP or JSON file is quick, but the team must then recheck every changed step, reconfirm that assets and dynamic content resolved, and retest with the test contacts. If a fix changes a custom field name or a segment definition, the rerun also touches anything that referenced it, which extends verification. Ask any partner how reruns are priced and whether a retest is included in the fixed scope.
What should we ask a partner for in a fixed-scope quote?
A fixed-scope quote should name the campaigns in scope, the source and target instances, the export format and whether JSON or ZIP files are used, and which dependencies are included or excluded. It should also state the testing steps, the sign-off point, what happens if a dependency is missing in the target, and how a rerun after fixes is handled. Ask what is one-time work and what recurs, such as later updates or support, and who is responsible for the production environment and its backups. Your own team should confirm these terms in writing before work starts.
What breaks most often when a campaign moves between instances?
The most common failures come from differences between instances rather than from the import step itself. Custom fields, segment IDs, email templates, form references and integration settings may not match, so the imported campaign points to something that does not exist or behaves differently. Asset paths and dynamic content can also fail to resolve if they were not bundled. Check these references in the target before activation, and confirm that the cron jobs Mautic relies on for campaign updates and triggers are configured there.
Do imported campaigns need a consent and suppression check?
Yes, an imported campaign can send to contacts whose consent or preference settings differ in the target instance. Before activation, confirm that the segments the campaign uses exclude unsubscribed and do-not-contact contacts, and that the target's preference and consent data is correct. A campaign that was lawful in the source instance is not automatically safe in production, so ask whoever owns compliance to review the contact logic. This review is a check on your settings, not a certification.
Export and import flow between Mautic instances
The flow starts on the staging instance, where a campaign is exported as a ZIP that carries campaign data, external assets and dynamic content. The ZIP then crosses the trust boundary between instances and passes a review step before it is imported into production through the interface (ZIP only), the command line, or the API, which can also accept correctly structured JSON. Before activation, check the imported assets, dynamic content and segment references, then confirm the cron jobs that drive campaign updates and triggers are running.
Campaign ZIP moves from staging to production across a trust boundary, then gets verified and activated.
What to confirm with Mautic and in your own environment
Several parts of a campaign import depend on the Mautic release you run and on how your instance is configured, so confirm them before you rely on a staging test. Start with the file format. Mautic's documentation describes ZIP files produced by its own export function as the recommended input, and it also describes correctly structured JSON files for the command line and API routes. The exact JSON structure, the keys it expects and how it handles nested campaign steps can change between releases, so check the format against the Mautic docs for importing campaigns for the version you run, and do not hand-edit a file that has not been validated on that release.
Next, confirm how external assets and dynamic content behave in your environment. The export is described as including external assets and dynamic content, but a file that references assets stored outside the instance, such as a separate file store or a CDN path, will only work in the target if those locations are reachable and carry the same paths. Dynamic content references can also point to items that do not exist yet on the target instance. Build an inventory of every asset and dynamic content item the campaign uses, then confirm in staging which ones resolve, which need to be recreated and which URLs must change before production.
Finally, confirm who can run imports and what they can see. Import and export actions depend on the permissions of the user or API credential running them, so check the role that holds campaign import rights, the account used for command-line or API runs, and whether those credentials are scoped and rotated under your own policy. The Mautic docs for exporting campaigns are the reference for the release you run, but your own staging tests are the source of truth. Record the Mautic version, file format, asset locations and the account used for each test, and repeat the test after any upgrade.
How to plan rollback when an imported campaign misbehaves
This sequence gives the team a known-good state to return to and a way to confirm the imported campaign has stopped acting on contacts. It separates the immediate containment from the repair, so a second import only happens after the first problem is understood.
Keep the original ZIP and a target backup
Before the import runs, store the campaign ZIP file that was imported, unchanged, in your version-controlled or artifact store, and take a backup of the target Mautic database and uploaded files. The owner of the target environment does this, using the backup method your team already runs. It is done when the ZIP checksum is recorded and the backup has been restored to a separate location at least once, so you know it is usable.
Stop the imported campaign from running
In the Mautic interface, unpublish the imported campaign so it no longer evaluates contacts or triggers actions. Check that any emails, forms or assets it created are also held back if they should not send. The marketing operations owner makes this change and records the time and the user who made it. It is done when the campaign status reads unpublished and no new campaign events appear in the logs.
Check contact membership and activity
Review the campaign's contact list and the contacts it touched since the import. Look for contacts added to the campaign that should not be there, unexpected campaign membership changes, and emails or actions recorded against contacts outside the intended segment. Compare the results with the expected membership from the staging run. The check is complete when every unexpected change is listed with a count and a owner for the cleanup decision.
Decide on contact cleanup
Work out whether affected contacts need manual correction, such as removing campaign membership or reverting field values, or a restore from backup for a larger problem. Consent and suppression status should be checked for any contact who received a message in error, since that decision belongs to the compliance owner. The decision is recorded in writing with the approver's name before any data changes are made.
Reproduce the issue on staging
Import the same ZIP into a staging instance built from a recent copy of production configuration, then run the campaign against test contacts that match the failing conditions. Confirm whether the problem reproduces and identify the campaign element responsible. The result is a short written finding that names the element, the condition and the fix to test.
Retest before any second import
Apply the fix in the source campaign, export a new ZIP, and import it to staging again. Confirm the expected contact membership, email sending and triggers match the planned results, and that no contacts outside the target segment are affected. The second import to production is approved only after this retest passes and the approver has reviewed the staging report.
Confirm recovery steps in your environment
The exact restore and rollback procedure depends on how your target backups are taken, retained and restored, including database snapshots, file backups and any queue or cron state. Confirm these details with the team that runs the target environment and document them in the runbook before the import. The step is complete when the restore procedure has been written down, reviewed and tested on a non-production copy.
How DeployOpen scopes and delivers Mautic campaign migrations
DeployOpen plans and delivers Mautic campaign import and export as a fixed-scope piece of work inside your own infrastructure. We agree in writing which campaigns, assets and dynamic content move, then test the export and import path between your staging and production instances before anything goes live.
How we scope
- We inventory the campaigns, assets and dynamic content that the written scope will move between instances.
- We confirm the source and target Mautic versions, since export and import behavior depends on the release you run.
- We record which items depend on segments, email templates, forms or CRM plugins that must already exist on the target.
How we build
- We export campaigns as ZIP files from the source instance, using Mautic's export function rather than hand-built files.
- We import into a staging copy first and check campaign structure, external assets and dynamic content against the source.
- We document any command line or API import steps we use, so your team can repeat them on later releases.
How we hand over
- We deliver a runbook covering export, transfer, import and post-import checks for your environment.
- We hand over a verification record listing each campaign, its assets and its dependencies, with the outcome of each check.
- We walk your marketing operations and platform staff through the steps and the items they must review after each move.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, which can cover later migrations between instances.
- We can re-run the export and import steps when you upgrade Mautic to a newer release line and retest the affected campaigns.
- Before you request a quote, confirm with us whether your scope includes the plugins and integrations your campaigns rely on.

