---
title: "Migrate Magento 2"
url: https://docs.corefinity.com/guides/migrate/migrate-magento-2
type: guide
last_updated: 2026-11-13
feature: migrate-magento
---
# Migrate Magento 2

Move a Magento 2 store from another host with an AI assistant, build and index the copy, then switch the domain.

## Before you start

- You have what every migration needs: see [Cut over and roll back](/guides/migrate/cut-over-and-roll-back).
- The store runs Magento 2.4.8. Upgrade an older store first, on the old host or on a copy of it.
- You keep the `crypt/key` of the old `app/etc/env.php`: encrypted settings and payment data depend on it.

## What is particular to Magento 2

- The site is created empty, of size M to XL, and stays on manual deployments for the whole move.
- Compiling Magento needs about 2 GB of command-line memory, which only the XL size has. On M or L the assistant copies `generated/` and `pub/static/` from the old host, when both run the same PHP version and modules.
- The database is imported without caches, sessions and queued work. Your `env.php` is copied, and its database, cache, sessions and search point at the new site.
- The hold also turns email off in every store.
- The assistant tests the home page, a category, a product, search, the cart, the login page, GraphQL, the admin address, a static asset and a media image.

Test each store domain using the [store checks in the Magento stores guide](/guides/sites/go-live/magento-stores).

## What you decide

- Every change to the production environment.
- A larger size when the store can neither be compiled on the one you chose nor take the old host's compiled files: see [Upgrade package](/guides/sites/size-and-capacity/upgrade-a-package).
- When to go back to deployments from Git, after the move.

Never place a live order on the copy. A store that has not compiled is never switched live.

## Start the move

Give the assistant your own values. It follows the `migrate-magento` playbook.

```text
Use the Corefinity MCP prompt "migrate-magento" with domain: shop.example.com,
old_host: ssh deploy@old.example.com, version: 2.4.8-p3.
Follow it step by step and tell me before anything that changes my account.
```

## Related

- [Cut over and roll back](/guides/migrate/cut-over-and-roll-back): Switch a migrated site's domain.
- [Magento 2](/guides/platforms/magento-2): See what differs for Magento 2.
- [Pipeline](/guides/sites/code-and-deployments/pipeline-stages): Change what a deployment runs.
