Moving Mautic to a new server or off shared hosting

Moving Mautic off shared hosting means rebuilding the server stack and carrying the database, configuration, media and scheduled jobs across intact. Here is what carries over, what must be rebuilt and what drives the effort.

On this page

Moving Mautic to a new server without losing contacts or tracking

Contact data lives in the database, and a codebase move does not change it. When a team leaves shared hosting or changes providers, the work is mainly copying and verifying four things on a VPS or dedicated server: the database, the configuration file local.php, the media folders, and the cron jobs that drive segments, campaigns and broadcasts. Because the database is separate from the codebase, contacts, segments, campaign history and consent records move as one dump, provided the dump is complete and the restored copy matches the source row counts for contacts, companies and campaign events. The effort depends on the size of the instance, the number of integrations (such as the HubSpot or Salesforce plugins) and sending domains that must be reconfigured, and whether the team can run the old and new servers in parallel for a period. Ask any partner to size each of these in writing before the cutover date is set, since none of them can be estimated reliably from the page alone.

The server move also has a consequence that is easy to miss: the tracking code. Mautic's default tracking code changes when a custom domain is added or edited, so every website that embeds the script must receive the updated code once the domain points to the new host. Before cutover, confirm the tracking domain, DNS records and TLS certificate on the new server, then check the tracking code on a sample of live pages after the switch. File ownership is the other common failure point: the web server user must be able to read the codebase and write to the cache, logs and media folders, while the cron user must be able to run the Mautic console commands. Verify both with a test page view, a test form submission and a manual run of each cron command. Keep the old server online and its cron jobs disabled until these checks pass, so a rollback remains possible.

What carries over to the new server and what must be rebuilt

This table compares each part of a running Mautic instance with how it is handled on the new host. Items that copy unchanged are the database and media folders, while configuration, web server, cron, SSL, and tracking code need new values or re-checking. Use it as a sign-off list before you point DNS at the new server.

ItemTreatment on the new hostVerify after the move
Contact databaseCopies unchanged. Contact data lives in the database, separate from the codebase, so it moves by dump and restore.Record counts, segments and campaign membership match the source instance.
CodebaseRebuilt on the new host from the supported Composer-based setup rather than copied from the old server.Mautic loads, version shown in the admin matches the target release.
local.php configurationCopy the file, then update host, database and mailer values that differ on the new server.Database connection and site URL work without errors in the logs.
Media foldersCopy unchanged, keeping uploaded images and files referenced by emails and landing pages.Images in existing emails and pages load from the new host.
File ownership and permissionsSet ownership to the web server user on the new host, since copied files often keep the old user IDs.Mautic can write cache, logs and media without permission errors.
PHP and database versionsMust be rebuilt to match the target release. The current release requires PHP 8.2 to 8.5 and MySQL 5.7 or higher with InnoDB, or MariaDB 10.2 or higher.Run the requirements check and confirm the versions the installed release lists.
Web server virtual hostRecreate on the new host. Apache, Nginx or IIS is supported, and the domain and document root must be configured again.Admin, public pages and tracking endpoints respond over the intended domain.
Cron jobs and queue workersRecreate on the new host. Segment, campaign and broadcast commands and the messenger consumer do not move with the files.Jobs run on schedule, staggered, and queued email is delivered.
SSL and domain settingsIssue a new certificate for the new host and update the site URL. Confirm the domain is correct in configuration.Certificate is valid and links, redirects and emails point to the right address.
Tracking codeCheck after the move. The default tracking code changes when a custom domain is added or edited, so websites must use the updated code.Each tracked website loads the current script and visits register in the contact timeline.
Email transport credentialsRe-enter or confirm on the new host. Sending IPs and DNS records may also change with the new server.Test email sends and confirm authentication results with the provider.
CRM plugin credentialsRe-authorize connections such as HubSpot or Salesforce if the callback address or host changed.Test contact push to the CRM and confirm the mapped fields arrive.

Mautic server migration: which documented paths move data and files

A move to a new server comes down to two parts: the database, where contact data lives, and the codebase, which holds configuration and media. The documented paths treat these separately, so each card below covers one piece of the move or one decision that shapes it.

Export and import the database

The database holds contacts, segments, campaigns and history, so it is the part you cannot rebuild. Use the standard MySQL or MariaDB dump and import tooling, taking the dump while writes are paused or from a consistent snapshot. Confirm the exact commands and the database version requirements against the docs for your Mautic release, and check row counts for key tables after the import.

Mautic requirements

Copy the codebase and configuration

Moving to a new codebase means copying configuration files such as local.php and the media folders, while the database stays as it is. Keep the copied configuration with the new host's database credentials, domain and mailer settings, and do not carry over old cache or log contents. Compare the copied files with the release you are running before you point traffic at the new server.

Switch to Composer docs

Install a fresh codebase on the new host

You can install a clean codebase with the web installer, the command-line installer or Composer, then restore your data over it. The Composer project template is the current recommended setup, so a fresh install on the new host should normally use it. Choose the installer path before you copy any files, because the file layout differs between methods.

Installation docs

Keep file ownership and permissions correct

After copying files, the web server user must own the paths Mautic writes to, including cache, logs and media folders. Wrong ownership is a common cause of upload failures and blank pages after a move. Record the user and group your web server runs as on the old host, then match them on the new host and verify write access before go-live.

Reconfigure cron jobs on the new host

Mautic relies on cron jobs for segment updates, campaign updates and campaign triggers, plus a broadcasts command for segment emails. These do not move with the files, so the new server needs them scheduled again, staggered as the docs describe. Also confirm the messenger consumer runs if emails are queued, and stop the old host's jobs to avoid duplicate sends.

Cron jobs docs

Check tracking code after the domain change

If the new host uses a different domain or a custom domain is added, Mautic's default tracking code changes. Websites must be updated with the new code, or visitor tracking silently stops. Check the tracking settings after the cutover and confirm that a test page on each tracked site reports visits to the new instance.

Configuration settings

Why shared hosting has to end before the move

The Mautic project states that Mautic should not be installed on shared hosting and recommends a VPS or dedicated server instead. Treat that as the starting requirement for the move, not as a preference to weigh against cost. Shared plans typically limit what you can install, how PHP is configured, and whether background processes such as cron jobs can run reliably, and Mautic depends on all three. The Mautic requirements page is the reference to check before you commit to a provider.

For Mautic 7.0, the new host must provide PHP 8.2, 8.3, 8.4 or 8.5, MySQL 5.7 or higher with InnoDB or MariaDB 10.2 or higher, Apache, Nginx or IIS, and npm, since npm is required from Mautic 5.0 onward. Confirm these against the exact release you plan to run, because the requirements can differ between lines. Ask the provider whether they give you root or sudo access, control over PHP-FPM or module settings, and the ability to schedule cron jobs as the web user. If any answer is no, the server is not a suitable target.

The release line you pick also sets how long you receive security fixes. Check the support dates for the target version before you choose it, since a move is a poor moment to land on a branch that is close to end of support. Confirm the current dates on the Mautic releases page, and plan a follow-up upgrade if the window is short. Ask the provider for a written inventory of the software versions they will install so you can compare it with the requirements before the database is copied.

How the database, codebase and files move from the old host to the new one

The move starts on the old host, where the database, codebase, local.php, media folders and cron jobs all live. The database and configuration are copied to a fresh install on the new host, and new cron entries are added there. Before cutover, the team tests the new instance in parallel and confirms that email sending and tracking work. Only then does DNS point to the new server and the website tracking code is updated.

Data, code and files moving from the old host to the new host, with the pre-cutover check.

How a Mautic server migration runs from inventory to decommission

The sequence moves a running Mautic instance to new infrastructure in controlled stages, so the team can verify each part before contacts, sending and tracking depend on the new host. Each stage ends with a written check that gates the next one.

  1. Inventory the current installation

    Record the PHP version, database engine and version, cron entries, installed plugins, email transport settings, custom domains and the location of configuration and media folders on the current host. Include who owns each cron job and which websites carry the Mautic tracking code. The output is a written inventory signed off by the Mautic owner and the platform engineer, and it becomes the checklist for every later step. Confirm the current release line against the Mautic releases page before building anything.

  2. Build the new server on the same release line

    Provision a VPS or dedicated server rather than shared hosting, since the Mautic project advises against shared hosting. Install the PHP version, database engine, web server and npm that the release requires, and install the same Mautic release line as the source instance so the codebase matches the database schema. Verify the requirements page for the chosen release before provisioning. The output is an empty Mautic install that loads over HTTPS on a temporary hostname, with file ownership set for the web server user.

  3. Restore a test copy with cron held off

    Copy the database and the configuration file, along with the media folders, to the new server and restore them into a separate test environment. Disable or do not install the cron entries and the messenger consumer on the test copy so it cannot update segments, trigger campaigns or send email against live contacts. Check that the test copy loads, that the admin login works and that the record count for contacts matches the source. The output is a dated restore log with the row counts and the file checksums compared against the source.

  4. Run a parallel check of segments, campaigns and sending

    Keep the test copy isolated from production contacts and run manual checks: rebuild a sample segment, step a test contact through a campaign, confirm that the email transport reaches a controlled test mailbox and confirm that custom domain and tracking settings resolve. Compare the results against the source instance for the same records. Log each defect, fix it on the new server and repeat the check until results match. The output is a signed parallel-run report that lists every check, its result and any open issue that blocks cutover.

  5. Execute the cutover window

    In an agreed window, put the source instance into a maintenance state, stop cron jobs and workers there, and take a final database export. Import it into the new server, restore the latest media and configuration changes, then start cron jobs and the messenger consumer on the new host only. Change the DNS record for the Mautic hostname and update the tracking code on each website that embeds it, because the default tracking code changes when a custom domain is added or edited. The output is a cutover log with timestamps, the DNS change record and a list of websites confirmed to load the updated tracking code.

  6. Validate live operation after cutover

    Watch the first scheduled runs of segment updates, campaign triggers and broadcasts on the new host, and check the message queue for stuck items. Confirm that new form submissions create contacts, that tracked page views attribute to contacts and that outbound email leaves through the expected transport with authentication still passing. Check that any CRM integration still syncs. The output is a post-cutover validation checklist with each item marked passed, along with a record of any issue that was resolved during the watch period.

  7. Decommission the old host after confirmation

    Keep the source instance intact and read-only for a confirmed period agreed in advance, so the team can recover if a problem appears later. Confirm that no cron entries, DNS records or websites still point to the old host, then take a final backup of the source database and files before removing it. Store the backup under the same retention rules as the production data. The output is a decommission record listing the backup location, the date the old host was shut down and the owner who approved removal.

Cron jobs and tracking code checks after the cutover

Mautic depends on cron jobs to do much of its work after the site is running. Segment updates, campaign updates and campaign triggers all run on schedules, and the Mautic cron jobs documentation says these should be staggered rather than fired at the same moment. Segment emails are sent through a broadcasts command, and when email is queued, a messenger consumer must be running to send it. During the move, confirm each of these jobs exists on the new server with the correct PHP binary, the correct user and the correct path to the installed codebase, and confirm the jobs run without errors in their logs before you rely on them.

The most common cutover failure is the old host continuing to run the same jobs. If the previous server still has its crontab entries, and it still points at a database or mail queue that the new server is also using, you can get duplicate campaign sends, double-counted triggers or contacts who are moved through a campaign in the wrong order. The reverse also happens: jobs on the new server may never start because the crontab was not recreated, leaving triggers unfired. Before you switch DNS, list every scheduled entry on the old host, disable it there, and record the time you did so. Ask your team to confirm the messenger consumer is running on exactly one server that owns the queue.

Mautic's default tracking code changes when a custom domain is added or edited, as described in the configuration settings documentation. Any website that embeds the old script may keep sending visits to the previous domain or fail to identify visitors correctly. After the move, check the tracking code in Mautic's configuration for each custom domain, then compare it with the snippet installed on every website, including landing pages and any tag manager containers. Load a test page in a browser, confirm the tracking request reaches the new host, and confirm a test contact is identified in Mautic. Record these results so the checks can be repeated after future domain changes.

What drives the cost and duration of a Mautic server move

This table lists the factors that raise or lower the effort of moving Mautic to a new server or off shared hosting, with whether each cost is one-time or recurring and what to request in a written quote. Use it to compare your own environment against the scope a partner would price. The main takeaway is that database size, the number of domains and integrations, and any change in email sending usually matter more than the server itself.

DriverWhy it changes effortOne-time or recurringWhat to ask for in a quote
Contact database size and historyLarger tables take longer to dump, transfer and verify, and years of contact history add checks for orphaned records and failed imports.One-timeStated database size, table count, the verification method and who runs the row-count comparison.
Custom domains and tracking codeEach custom domain or website using Mautic tracking code must receive the updated script after the move, and every site needs a retest.One-time, with ongoing checks if sites changeA list of domains and sites, the tracking code update steps and the post-move test plan for each site.
Plugins and CRM or SMS integrationsEach plugin, HubSpot or Salesforce connection and SMS provider needs its credentials, callbacks and sync state confirmed on the new host.One-time setup, recurring vendor fees and maintenanceInventory of installed plugins and integrations, credential handling steps and which sync states are verified.
Email transport and sending domainChanging the SMTP or API transport, sending IP or DNS records affects deliverability, so authentication records may need review before cutover.One-time, with recurring sending costs billed by the providerCurrent and target transport, DNS change list, and whether authentication records are reviewed or only copied.
PHP or database version changeMoving to a new PHP or MySQL/MariaDB version on top of the server move adds compatibility testing. Mautic 7.0 requires PHP 8.2 to 8.5 and MySQL 5.7 or higher with InnoDB, or MariaDB 10.2 or higher.One-timeTarget PHP and database versions, the compatibility check list and whether the Mautic release changes in the same window.
Parallel run and cutover windowKeeping the old and new hosts running side by side for testing, cron verification and rollback readiness extends the project and the hosting overlap.One-time, plus recurring cost while both hosts runLength of the parallel run, rollback steps, who monitors cron and queue jobs, and the hosting overlap cost.
Team Linux and PHP skillsInternal teams that already manage web servers, file ownership and cron can move faster. Teams new to these areas need more guidance and review time.One-time, plus recurring support if the team takes over operationsWhich tasks the partner performs, which your staff perform, and what handover documentation is included.

What usually goes wrong in a Mautic server move and how to prevent it

Most failed Mautic moves do not fail loudly. The site loads, but cron runs twice, cache writes fail, or visitors are tracked from the wrong domain. Each risk below has a prevention step and a check that shows the move worked.

Cron jobs running on both hosts

Segment updates, campaign updates, campaign triggers and the broadcasts command all depend on cron. If the old and new servers both keep their schedules active, campaigns can fire twice and contacts can receive duplicate emails. Disable the cron entries on the old host before the cutover, and enable them on the new host only after the database has been confirmed live there. Check the scheduler on both servers and review the campaign logs for duplicate events in the first day after the move.

Mautic cron docs

File ownership blocking writes

The web server user must be able to write to the cache, logs and media folders. Copying files as root or with a different user often leaves these directories read-only for the web process, which shows up as broken images, failed uploads or errors on first page load. Set ownership to the web server user after copying, and confirm permissions on the media and cache paths. Test by uploading an image in the asset manager and loading a page that triggers a cache rebuild.

PHP or database version mismatch

Mautic 7.0 requires PHP 8.2, 8.3, 8.4 or 8.5 and MySQL 5.7 or higher with InnoDB, or MariaDB 10.2 or higher. A new server built from a different default image can ship a PHP or database version outside that range, and the application may fail during the first request. Confirm the target versions against the requirements page before copying data, and record the versions on both hosts. Check the result by loading the admin dashboard and running the Mautic system check after the move.

Mautic requirements

Configuration pointing at the old host

The configuration file, typically local.php, stores the database host, site URL and mail settings. Values copied unchanged can keep the application connected to the old database server, generate links to the old domain or send mail through credentials tied to the old host. Review every host, URL and path key in the file before the first request on the new server. Verify by generating a test email and clicking a link from it, and by confirming that a fresh login writes to the new database.

Tracking code left unchanged on websites

Mautic's default tracking code changes when a custom domain is added or edited. Websites that still carry the old script may keep sending visits to a domain that no longer serves Mautic, so tracking goes silent without an error. After any domain change, copy the updated tracking code from the Mautic configuration settings into every site that uses it. Verify with a browser session on each site and confirm that a test visit appears on the contact timeline.

Configuration settings

Email sent from an unverified transport

Moving servers changes the sending IP address, and the new host may not be authorized to send for your sending domain. Mail sent before the sender's DNS authentication records and transport settings are updated can land in spam folders or be rejected. Confirm the transport credentials, sending domain and authentication records for the new host before enabling sends. Verify by sending test messages to several mailbox providers and checking the authentication results in the headers.

How much does a Mautic server migration cost and what does the work need from us

How much does a Mautic server migration cost?

No price is published for this work, and DeployOpen does not publish a price list. The cost follows from a written scope, so the figure depends on what is moved and how it is checked. The main cost drivers are the size of the database and media folders, how many custom plugins, themes or cron jobs must be reproduced, whether the target is a new VPS or a dedicated server, and whether you want a rehearsal on a staging copy before cutover. Ask any provider for a quote that lists each of these items separately, plus the one-time work and any recurring support you would add afterward.

How long does a Mautic server move take?

Duration depends on the same factors as cost, and no fixed timeline is supplied for this work, so confirm it in the written scope. The timing is usually set by data volume, how quickly your provider can prepare the new server, the number of DNS and tracking code changes, and when your change window is available. Plan for at least one rehearsal copy before the final switch, because the database copy and file ownership checks are the steps most likely to need a second pass.

What do we need to provide for a Mautic migration?

Expect to provide the following before work starts:

  • Administrative access to the current server and the new target, including SSH or equivalent
  • Database credentials for the source and target, and a backup you trust
  • DNS control for the Mautic domain and any custom tracking domains
  • A named sender contact for email delivery settings and transport credentials
  • A change window agreed with marketing operations, since campaigns and cron jobs pause during the switch

Confirm each item in the written scope so nothing is discovered during the cutover.

Can our internal engineer migrate Mautic alone?

Yes, a capable internal engineer can carry out the move, provided they have Linux administration, database and web server skills and time for testing. The work has several places where a small error stops the instance from sending or tracking. Common examples include wrong file ownership after copying, a missing copy of the configuration file, cron jobs not reinstalled, and tracking code still pointing at the old domain. Ask whether your engineer has run the Mautic cron jobs and a messenger consumer before, and whether they have a rollback plan. If not, a partner can handle the work or review the runbook.

Can a Mautic server migration be done without downtime?

Zero downtime is possible only with careful planning, and the outcome depends on your setup. Mautic separates the database from the codebase, so you can prepare the new server in advance and synchronize data before switching DNS. However, the final database sync, the change to the web server, and DNS propagation usually create a short interruption for tracking and sending. Ask your provider to describe the expected interruption window in the written scope, and to explain how queued emails and campaign triggers are paused and resumed.

What tracking code checks are needed after a Mautic move?

After the move, check the tracking code on every website that loads it, because Mautic changes its default tracking code when a custom domain is added or edited, and websites must use the updated code. Confirm that the new server serves the correct domain, that the tracking script loads on a test page, and that visits appear on a test contact. Keep a short list of which sites embed the script so the update can be confirmed quickly after cutover.

What should the written scope include before we sign?

A useful scope lists the source and target environments, the Mautic version and PHP version on each side, the database and media folder sizes, the configuration files to be carried across, the cron jobs and messenger consumer to be recreated, the DNS and tracking code changes, the rehearsal and rollback steps, and the acceptance tests. It should also name who is responsible for each item and what you receive at the end, such as a runbook and a post-move checklist. Use this scope to compare quotes from providers on equal terms.

How DeployOpen works on this

DeployOpen plans and carries out the move of a Mautic instance into infrastructure you control, whether that is a VPS, a dedicated server or a new provider. The work starts with a written scope that sets out what is copied, tested and documented, and the cutover is planned around your campaigns, cron jobs and tracking code.

How we scope

  • Inventory the current host, PHP and database versions, web server, cron jobs and media folders before any move is planned
  • Agree in writing which Mautic release the new server will run, checked against the supported release dates
  • Confirm the cutover window, DNS and email sending plans, and the list of websites that must receive an updated tracking code

How we build

  • Build the new server to the Mautic requirements, including the supported PHP version, InnoDB-backed MySQL or MariaDB and the chosen web server
  • Copy the database, codebase, local.php configuration and media folders, then correct file ownership and verify the permissions
  • Rebuild and test cron jobs for segments, campaigns and broadcasts, plus the messenger consumer if email is queued, before go-live

How we hand over

  • Deliver a written runbook covering the server layout, file locations, cron schedule and the rollback steps used during cutover
  • Document the post-move checks, including segment and campaign runs, email sending tests and the tracking code verification results
  • Walk your administrators through the runbook so your team can operate the instance after the engagement closes

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer once the move is complete
  • Follow the Mautic release cadence so the instance stays on a supported release line after the move
  • Retest cron jobs, tracking code and email delivery after any server, PHP or Mautic upgrade made under the retainer

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.