cancel
Showing results for 
Search instead for 
Did you mean: 

How to migrate a Magento from source to Composer

How to migrate a Magento from source to Composer

Hi , I have a magento 2.4.6 installed by source and i want to migrate to composer install to upgrade easly. Is there a tutorial to do it ?

2 REPLIES 2

Re: How to migrate a Magento from source to Composer


@akstern UTSA Blackboard wrote:

Hi , I have a magento 2.4.6 installed by source and i want to migrate to composer install to upgrade easly. Is there a tutorial to do it ?


Yes, there are several tutorials available online that can guide you through the process of migrating a Magento installation from source to Composer. Here are some steps that you can follow:

  1. First, create a backup of your current Magento installation to ensure that you do not lose any data during the migration process.

  2. Next, install Composer on your system if it is not already installed. You can download the latest version of Composer from.

  3. Once Composer is installed, navigate to your Magento installation directory and run the following command to initialize Composer:

    composer init
  4. Follow the prompts to configure your Composer installation.

  5. Next, run the following command to install Magento using Composer:

    composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

    This will install the latest version of Magento using Composer.

  6. Finally, copy your existing Magento files and directories to the new installation directory.

Please note that these steps are a general guideline and may not be applicable to your specific Magento installation. I suggest consulting the official Magento documentation or seeking assistance from the Magento community for more detailed instructions.

 

Re: How to migrate a Magento from source to Composer

Hello @akstern 

 

Create full backup of you magento installation directory and database.

 

Run bellow commands using terminal:

cp composer.json composer.json.bak
composer remove magento/product-community-edition --no-update
composer require magento/composer-root-update-plugin ~2.0 --no-update
composer require magento/product-community-edition=2.4.6 --no-update
composer update

If found any issue regarding composer then run below commands:

cp composer.json composer.json.bak
composer remove magento/product-community-edition --no-update
composer require magento/composer-root-update-plugin ~2.0 --no-update
composer require magento/product-community-edition=2.4.6 --no-update

Open composer.json and replace content of "require-dev"

"require-dev": {
            "allure-framework/allure-phpunit": "^2",
            "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
            "dg/bypass-finals": "^1.4",
            "friendsofphp/php-cs-fixer": "^3.8",
            "lusitanian/oauth": "^0.8",
            "magento/magento-coding-standard": "*",
            "magento/magento2-functional-testing-framework": "^4.2.1",
            "pdepend/pdepend": "^2.10",
            "phpmd/phpmd": "^2.12",
            "phpstan/phpstan": "^1.9",
            "phpunit/phpunit": "^9.5",
            "sebastian/phpcpd": "^6.0",
            "symfony/finder": "^5.4"
 },

composer update

 

Run magento commands:

php bin/magento s:up
php bin/magento s:d:c
php bin/magento s:s:d -f
php bin/magento c:f

Hope it helps !

If you find our reply helpful, please give us kudos.

 

A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.

 

WebDesk Solution Support Team

Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

 

 

 

 

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9