Magento...
Magento 1 to Magento 2 Migration: Your Essential Roadmap

Magento 1 to Magento 2 Migration: Your Essential Roadmap

Magento

June 3, 2025
With Magento 1 reaching end-of-life support over five years ago, migrating to Magento 2 has evolved from a strategic consideration to an urgent operational necessity. As a hosting provider with extensive migration experience, we’ve helped countless businesses transition from an outdated, vulnerable platform to a modern, secure Magento 2 ecosystem.

This essential upgrade unlocks superior performance, enhanced security, and future-ready features. Let us guide you through this critical migration process.

Extensions and custom modules
  • List all installed extensions (active and inactive).
  • Check Magento Marketplace for Magento 2 equivalents.
  • Identify deprecated or unsupported modules (these will need replacement).

Themes and customizations
  • Document all theme modifications.
  • Magento 2 uses a different theming structure—full redesign is often necessary.

Custom code and overrides
  • Audit custom PHP, JS, and XML modifications.
  • Plan for refactoring using the code migration toolkit.
  • Remove outdated data (old logs, abandoned carts, redundant product attributes).
  • Archive unnecessary CMS pages, sales rules, and customer segments.
  • Optimize the database to reduce migration tool processing time.
  • Export all critical URLs (products, categories, CMS pages).
  • Plan 301 redirects to preserve SEO rankings.
  • Ensure URL structures remain consistent (or map old > new URLs if changing).
  • Full database backup (including incremental data like recent orders).
  • Backup media files, custom code, and configuration files.
  • Store backups securely (not just on the same server).
  • Check PHP, MySQL, Elasticsearch, and other server specs.
  • Ensure new production hardware or staging server meets requirements.
  • Generate public key and private key via the new access key button in Magento Marketplace.
  • Required for composer-based installations.
  • Full migration (one-time data transfer).
  • Incremental migration (captures updates during the transition).
  • Assess if a migration service (agency) is needed for complex stores.
Trying to migrate 100% of data as-is
Some legacy data (e.g., old logs, temporary tables) doesn’t need migration. Instead, focus on essential data (products, customers, orders, categories).

Migrating unused extensions and themes
If an extension isn’t critical, drop it instead of forcing compatibility. Magento 1 themes cannot be directly ported—plan for a redesign.

Manual data transfer without the Migration Tool
Avoid exporting/importing files manually (leads to errors). The Magento Data Migration Tool handles structured transferring data safely.

Over-optimizing before migration
Don’t spend weeks fine-tuning Magento 1 — focus on Magento 2 setup instead. Performance tuning should happen after migration.

Ignoring post-migration testing
Testing is critical—but it comes after migration planning. Pre-migration, focus on preparation, not validation.

Simultaneously, prepare the Magento 2 environment. We recommend involving new production hardware or, most often, a staging server.

The easiest way to install Magento 2 is by using an archive file:
  1. Download the Magento 2 package and upload it to your server's root directory.
  2. Extract the archive in the site root directory.
  3. Launch the Magento 2 Setup Wizard and follow the installation steps.
  4. Set up an admin account and begin customizing your store.

Obtain your authentication keys (both public key and private key) from your Magento Marketplace account. These keys are essential for using Composer. Here’s how you can do this:
  1. Go to the Adobe Commerce Marketplace.
  2. Use your Adobe ID or Magento Marketplace credentials to log in.
  3. After logging in, click your profile name (top-right).
  4. In your profile dashboard, click Marketplace > Access Keys (left sidebar). If you don’t see "Access Keys," ensure you’re in the Seller section.
  5. If you need new keys: click Create a New Access Key, then enter a descriptive Key Name (e.g., Magento 2 Server). Click OK.
  6. Under Your Access Keys, find the key set you need.
  7. Copy both values:

  • Public Key: Username (e.g., abcdef0123456789abcdef0123456789)
  • Private Key: Password (e.g., 1a2b3c4d5e6f7g8h9i0j)


Magento 2 Access Keys. Source: Medium

Back up your entire Magento 1 store — database assets, root directory, media files, and code. This safety net is non-negotiable before initiating any migrate Magento operations.
As we mentioned above, migrating themes directly is rarely feasible due to architectural differences. Plan for redesign using modern Magento 2 themes or custom development. For extension migration, verify compatibility with your target Magento 2 version. Repurchase or find alternatives on the Magento Marketplace where necessary. Custom code demands meticulous attention. Utilize the code migration toolkit to analyze and refactor custom modules, ensuring compatibility. This phase often requires significant development resources.
Magento 2 offers native support for Varnish Cache (unlike Magento 1, which required manual setup). This speeds up page loading by 5–10x through static content caching and reduces server load. For example: In Magento 2, Varnish is enabled by default as part of the recommended technology stack (alongside Redis and Elasticsearch).

So, before migration ensure your server supports Varnish (version 6.x or higher). For cloud solutions (e.g., Adobe Commerce Cloud), Varnish is pre-installed. For on-premise setups, configure it in env.php and your web server (Nginx/Apache).
Why do you need to clean data first? By this you reduce migration time by 30-70%. It helps prevent transfer of corrupted/invalid records, avoid bloating your Magento 2 database, and remove sensitive logs.

First of all, we advise you to identify data to clean.

Data TypeSafe to remove?Recommendation
Old Orders✅ Yes Keep only orders from last 2-3 years (modify retention policy)
Canceled Orders✅ YesDelete ALL canceled orders
System Logs✅ YesClear all log_* tables (log_visitor, log_url, log_customer, etc.)
Abandoned Carts✅ YesDelete quotes older than 90 days (quote, quote_item, quote_address)
Disabled Products✅ YesRemove products with status = Disabled + no sales history
Duplicate Products✅ YesMerge using tools like Unirgy_Duplicate
Outdated Reports✅ YesClear via Admin: Reports > Reviews, Reports > Products, etc.
Customer Session Data✅ YesTruncate customer_visitor and core_session tables
SEO Redirects❌ No Preserve for migration to Magento 2
Backup first!

Run mysqldump -u [user] -p [dbname] > magento1_backup.sql
Or create a backup of your database in phpMyAdmin or another control panel.

Option A: Direct SQL Queries (Recommended)
Delete canceled orders:

DELETE FROM `sales_flat_order` WHERE status = 'canceled';
Clear system logs
TRUNCATE `log_visitor`;
TRUNCATE `log_url`;
TRUNCATE `log_customer`;
Remove old carts
DELETE FROM `quote` WHERE updated_at < DATE_SUB(NOW(), INTERVAL 90 DAY);
Disabled products cleanup (customize IDs)
DELETE FROM `catalog_product_entity` WHERE entity_id IN (
SELECT entity_id FROM `catalog_product_entity_int`
WHERE attribute_id = (
SELECT attribute_id FROM eav_attribute
WHERE attribute_code = 'status' AND entity_type_id = 4
) AND value = 2
)

Option B: Admin Panel
Clean system logs:
System > Tools > Log Cleaning → Select all log types → Clean

Clean reports:
Reports > Advanced Reports → Flush reports storage

Clean carts:
No native tool → Use cleaner extensions

Option C: Magento Cleanup Scripts
  1. Install Magento Cleanup Tool
  2. Configure retention policies:

<config>
<global>
<mpcleanup>
<orders>1095</orders> <!-- Days to keep orders -->
<logs>30</logs> <!-- Days to keep logs -->
</mpcleanup>
</global>
</config>
Follow this process to identify opportunities and fix issues. We recommend using tools like: Google Search Console, Screaming Frog, Ahrefs/Semrush.

Proceed the crawlability check first and verify robots.txt isn't blocking critical pages.

User-agent: *
Disallow: /admin/
Disallow: /catalogsearch/
Allow: /*.css
Allow: /*.js

Check indexation status:
  • Search site:yourdomain.com in Google
  • Check GSC > Coverage for errors (404s, soft 404s)

Then check site speed:

  1. Optimize images (WebP or AxF format)
  2. Implement lazy loading for images
  3. Minify CSS/JS (Magento: bin/magento setup:static-content:deploy -f)

Test mobile-friendliness with Google Lighthouse.

This is where the official Magento Data Migration Tool becomes indispensable. To install the Data Migration Tool, add the vendor Magento data migration package using Composer.

Ensure you reference the correct data migration tool version matching your Magento 2 version. Open to the site root directory via SSH and use the following command:

php bin/magento --version

To ensure the Data Migration Tool functions correctly, you must specify its package location in the .json configuration file. Execute these commands to update the settings:

composer config repositories.magento composer https://repo.magento.com
composer require magento/data-migration-tool:{version}

Replace {version} with the appropriate tool version matching your Magento 2 installation. Then configure Composer to access Magento's repository:

composer config -g -- repositories.magento composer https://repo.magento.com/

Where to get credentials? Use authentication keys from your Magento Marketplace account:

composer config http-basic.repo.magento.com PUBLIC_KEY PRIVATE_KEY

The tool uses configuration files config.xml and mapping files (map.xml, eav.xml, etc.) — the mapping files provided offer a baseline, but expect customization to handle unique data structures or essential data transformations.

Configure Data Migration Tool by editing its config.xml file. Specify your Magento 1 and Magento 2 database connections, transferring data settings, and defining rules. Place the tool in your Magento 2 root directory's:

Migration TypeDirectory Path
Magento 1 Open Source → Magento 2 Open Sourceyour Magento 2 install dir>/vendor/magento/data-migration-tool/etc/opensource-to-opensource
Magento 1 Open Source → Magento 2 Commerceyour Magento 2 install dir>/vendor/magento/data-migration-tool/etc/opensource-to-commerce
Magento 1 Commerce → Magento 2 Commerceyour Magento 2 install dir>/vendor/magento/data-migration-tool/etc/commerce-to-commerce

Running the migration tool command window sequences is critical.

  1. Settings Migration: Transfer stores, configuration, and system settings (migrate:settings).
  2. Data Migration: Move core entities like products, customers, orders (migrate:data). This handles the bulk of migrated data.
  3. Incremental Migration: After initial data migration, use migrate:delta to incrementally capture data updates (new orders, customers) made on Magento 1 until cutover. Remember to stop incremental migration before the final go-live.

Here you will also need the Access Private and Public keys mentioned above. Keys authenticate Composer when installing the Data Migration Tool.

Create config.xml. Enter your migration directory (e.g., opensource-to-opensource/1.9.4.5), rename it: cp config.xml.dist config.xml. Then open your config file.

The config.xml file must contain the access details for the M1 and M2 databases and encryption keys. Basic structure example:

<source>
<database host="127.0.0.1" name="magento1" user="root"/>
</source>
<destination>
<database host="127.0.0.1" name="magento2" user="root"/>
</destination>
<options>
<crypt_key /> <!-- This field is mandatory! -->
</options>

Where database user password: password=<password>
Custom database port: port=<port>
Table prefix: <source_prefix>, <dest_prefix>

The <crypt_key> tag must contain a value. Locate it inside the <key> tag in the app/etc/local.xml file of your Magento 1 instance.

For user root with password pass and table prefix magento1 in Magento 1:

<source>
<database host="127.0.0.1" name="magento1" user="root" password="pass"/>
</source>
<destination>
<database host="127.0.0.1" name="magento2" user="root" password="pass"/>
</destination>
<options>
<source_prefix>magento1</source_prefix>
<crypt_key>f3e25abe619dae2387df9fs594f01985</crypt_key>
</options>

After editing, save changes to config.xml and exit the text editor.
Critical parameters:

  • <source>: Magento 1 database credentials
  • <destination>: Magento 2 database credentials
  • <crypt_key>: Find this in Magento 1’s app/etc/local.xml:

<key><![CDATA[YOUR_ENCRYPTION_KEY_HERE]]></key>

Ensure Data Migration Tool has unrestricted internet access (no firewalls blocking repo.magento.com).

If Magento 1 freeze:
  • Stop all admin activities (no product/category updates).
  • Disable non-essential cron jobs (keep only order processing if live):

# Disable all Magento 1 crons except sales
crontab -e 
→ COMMENT OUT non-order crons
  • Navigate to Magento 2 root
cd /var/www/magento2

  • Execute settings migration (use --reset to restart)
php bin/magento migrate:settings --reset \
vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.4.5/config.xml

The success message will look like this: Settings migration completed successfully.
Run command:

php bin/magento migrate:data --auto --reset \
vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.4.5/config.xml

  • --auto command: Automatically resolve integrity constraint errors
  • --reset command: Restart if interrupted

Success message: Data migration completed successfully.
Leave this running to sync new orders/customers from Magento 1 during cutover:

php bin/magento migrate:delta \
vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.4.5/config.xml
Reindex Magento 2:

php bin/magento indexer:reindex

Manual checks:

AreaVerify
ProductsSKUs, prices, inventory, images
OrdersStatuses, payment methods, shipping addresses
CustomersPasswords working, order history
Tax RulesCorrect calculations at checkout
Extensions Reinstalled and configured in Magento 2
Enable Varnish in the Admin Panel: System → Cache Management → Varnish Configuration. Configure cache purging for dynamic content (e.g., cart updates) via cron or event observers to avoid stale content.

Important! Without proper purge setup, display errors may occur.
Initiate cutover by enabling Maintenance Mode on Magento 1:

# Magento 1 root
touch maintenance.flag

Stop Delta Migration with Ctrl + C in the terminal.

Contribute final Magento 2 Setup:

# Start crons
php bin/magento cron:install
# Reindex stock (critical!)
php bin/magento indexer:reindex cataloginventory_stock
# Clean cache
php bin/magento cache:flush

DNS Cutover:
  • Update DNS to point to Magento 2 server.
  • Verify live site: https://yourstore.com/?test=1 (bypass cache).
CommandPurpose
migrate:settings --reset config.xmlTransfer system configurations
migrate:data --auto --reset config.xmlMove products, orders, customers
migrate:delta config.xmlSync ongoing changes
indexer:reindex catalog inventory_stockFix post-migration inventory counts
Pro Tip: Run top -c during migration to monitor server load. If CPU > 90%, pause and optimize DB indexes.

Monitor for 72 hours:
  • Check var/log/system.log for errors
  • Verify order processing in real-time

SEO preservation:
  • Ensure 301 redirects from old URLs are active
  • Submit new sitemap to Google Search Console

Performance tuning:

bin/magento config:set dev/js/enable_js_bundling 1
bin/magento config:set dev/css/minify_files 1

Post migration Varnish setup:
Check HTTP headers (via browser DevTools):

Status X-Magento-Cache-Debug: HIT confirms Varnish is working.

Tools like WebPageTest or Lighthouse can measure speed improvements.

After complete migration of settings migration and core data migration, meticulously verify the migrated data on your Magento 2 staging environment. Test critical functions: browsing, checkout, creating invoices, customer logins, and search. Apply necessary data fixes or adjustments. Configure cron jobs for incremental updates during the final sync window. For the actual go live:

  1. Place Magento 1 in maintenance mode.
  2. Run the final incremental migration to capture the last changes.
  3. Stop incremental migration.
  4. Point your DNS to the Magento 2 server.
  5. Flush caches and reindex in Magento 2.
  6. Exit maintenance mode.
  7. Thoroughly test the live Magento 2 store.

Does it look complicated? Don’t worry, we'll help you migrate the old one to a new one.

FAQ

Q: What is Magento migration?
A: Magento migration is the process of moving an online store's data (products, customers, orders), settings, themes, and extensions from Magento 1 to the newer Magento 2 platform. It involves using tools like the Magento Data Migration Tool and often significant code adaptation.

Q: How do I migrate my Magento 1.9 site to Magento 2.2 (or later)?
A: The core process remains consistent regardless of specific sub-versions (like 1 to Magento 2.2). Follow the steps outlined: audit, set up Magento 2, use the correct data migration tool package version for your Magento 2 target, configure data migration tool files, execute settings, data, and delta migrations, validate, and go live. Always use the data migration tool version compatible with your Magento 2 installation.

Q: What is the cost of Magento 1 to 2 migration?
A: Costs vary dramatically based on store complexity (number of SKUs, customers, orders), customizations, theme redesign needs, extension compatibility, and chosen migration service provider (agency vs. in-house). It's a significant investment, but essential for security and growth.

Q: What are some common issues during Magento 1 to 2 migration?
A: Common challenges include incompatible extensions requiring replacement, complex custom code migration, data inconsistencies needing manual cleanup in mapping files, performance bottlenecks during data migration, and ensuring SEO continuity. Thorough testing is key.

Q: What is the Magento 2 migration script?
A: The primary tool is the official Magento Data Migration Tool (vendor/magento/data-migration-tool), not a single script. It's a suite of commands (migrate:settings, migrate:data, migrate:delta) executed via the command line that handles the structured transferring data process using xml file and json file configurations. Avoid unreliable "migrate Magento" scripts found online; the official tool is maintained and supported.

Q: Do you provide support for migrating from Magento 1 to Magento 2?
A: Yes, this is one of our core specialties! We’ll guide you through every step: analysis, migration, configuration, and launch. You won’t face this complex process alone.

Migrating from Magento 1 to Magento 2 is a substantial undertaking, but the benefits of enhanced performance, security, and modern features are undeniable. While the data migration tool etc open source provides the core mechanism, success hinges on meticulous planning, testing, and often expert guidance. Don't let your store become vulnerable on an outdated platform.

Take the first step towards a faster, more secure, and scalable eCommerce future. Contact our expert Magento migration team at Scalesta for a personalized consultation and seamless transition plan. We'll handle the complexities so you can focus on growing your business.

Table of contents
By clicking Submit, you agree with Privacy Policy
Keep up to date with Scalesta and join our newsletter
Related posts
By clicking Send, you agree with Privacy Policy
Let's get started!
Ready to elevate your online presence with Scalesta hosting solutions?
Transform your operations with expert DevOps services