Move Magento to new domain

Move Magento to new domain

August 3, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Move Magento to new domain

Migrating Your Magento Site to a New Domain: Step-by-Step Guide

When migrating your Magento site from one domain to another, it’s crucial to follow best practices to ensure a smooth transition without losing data or breaking functionality. In this comprehensive guide, I’ll walk you through the process step by step and address Chris’s specific concerns.

Understanding the Migration Process

The migration involves two primary components: transferring the database and moving the files to the new domain.

Database Transfer:

  1. Backup the existing database (PHPMyAdmin > Export): This ensures that all your data, including products, customers, orders, and settings, are safely stored for the migration process.
  2. Create a new database on the target server: Ensure the database is compatible with your Magento version and has sufficient storage capacity.

File Transfer:

  1. Backup files using SSH (recommended) or FTP: If you have SSH access, it’s faster to compress the files into an archive for transfer. Otherwise, use FTP.
  2. Upload files to the new server: Place them in the root directory of your new domain.

Configuring Magento After Migration

Now that you’ve transferred both the database and files, follow these critical steps:

1. Update the Database Settings

Locate the local.xml file at app/etc/. Open it using a text editor like Notepad++ or Sublime Text. Ensure your new database name and credentials are correctly configured.

<db_host><![CDATA[localhost]]></db_host>
<db_name><![CDATA[magentodb]]></db_name>
<db_user><![CDATA[magento_user]]></db_user>
<db_pass><![CDATA[magento_password]]></db_pass>

2. Update Base URLs in the Database

Access your new database using PHPMyAdmin and locate the core_config_data table.

  • Search for ‘web/unsecure/base_url’ and update its value to your new domain, e.g., http://www.example.com/.
  • Similarly, find and update ‘web/secure_base_url’.

This ensures that Magento stops redirecting to the old domain after migration.

3. Clear Cache

Delete all contents from the var/cache directory. Magento’s cache can sometimes cause inconsistencies after a migration.

Debugging Chris’s Migration

Chris mentioned encountering issues during his migration process. Here are some troubleshooting steps:

  1. Check Database Connection: Ensure your local.xml file contains the correct database name, user, and password for your new server.
  2. Database Permissions: Verify that your Magento tables have proper read and write permissions on the new server.

Common Pitfalls to Avoid

  • Forgetting to clear cache: Incomplete or outdated cache can cause unexpected behavior after migration.
  • Ignoring secure URLs: Always ensure you update both unsecure and secure base URLs in core_config_data.
  • Not updating domain-specific settings: Magento stores domain details in various tables, so a thorough search for domain-related strings is recommended.

Conclusion

Migrating your Magento site to a new domain can be straightforward if you follow this comprehensive guide. Always test the migrated site thoroughly on a staging environment before going live to catch any potential issues early.

If you need professional assistance with Magento migrations or require custom development services, feel free to contact our team at Laravel Company for expert solutions tailored to your business needs.

Happy migration!

Catalog Database Admin Configuration

Our network