Back to Top

Migration Akeneo from 3.2 to 4.0

Updated 4 March 2020

This blog helps you to migrate/upgrade Akeneo Project from 3.2 version to 4.0.

Step1: Stop the running daemon service.

Step2: Take the MySQL Dump of your Production Database using the terminal or Backup Akeneo Connector

Step3: Download the Akeneo PIM 4.0 composer.json

Community Edition
You can download the composer.json file directly from the Github repository: https://raw.githubusercontent.com/akeneo/pim-community-standard/4.0/composer.json

Enterprise Edition
You will find the composer.json file inside the Akeneo Enterprise Edition archive. Please visit your Akeneo Portal to download the archive.

Step 4: Update the System Component (For Ubuntu, For Debian 10 )

Searching for an experienced
Akeneo Company ?
Find out More
  • PHP 7.3
  • MySQL 8
  • Elasticsearch 7.5

Step 5: Update the Virtual Host Configuration

  1. replace the public in place of web
  2. replace the index.php in place of app.php
<VirtualHost>
    ServerName akeneo-pim.local

    DocumentRoot /path/to/installation/pim-community-standard/public
    <Directory /path/to/installation/pim-community-standard/public>
        AllowOverride None
        Require all granted

        Options -MultiViews
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php [QSA,L]
    </Directory>

    <Directory /path/to/installation/pim-community-standard/public/bundles>
        RewriteEngine Off
    </Directory>

    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost/"
    </FilesMatch>

    SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

    ErrorLog ${APACHE_LOG_DIR}/akeneo-pim_error.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/akeneo-pim_access.log combined
</VirtualHost>

Step 6: Prepare Akeneo

SSH and goto at your Akeneo 3.2 document root directory.

Remove the cache using the command

rm -rf var/cache/

Copy the Akeneo 4 composer.json at the root directory using the command.

cp /path/to/pim-4.0-composer.json .

Step 7: Install Akeneo 4.0 dependencies

php -d memory_limit=4G /usr/local/bin/composer update

Step 8: Update the current FileSystem Layout to match the Symfony 4 structure.

For the Akeneo PIM Community 4.0:

vendor/akeneo/pim-community-dev/std-build/migration/prepare_32_to_40.sh

For the Akeneo PIM Enterprise 4.0:

vendor/akeneo/pim-enterprise-dev/std-build/migration/prepare_32_to_40.sh

Step 9: Update the MySQL and Elasticsearch Credentials

edit the .env file from your Akeneo Document root directory. and update the parameters.

APP_DATABASE_HOST=mysql-host
APP_DATABASE_PORT=3306
APP_DATABASE_NAME=akeneo_pim_db_name
APP_DATABASE_USER=akeneo_pim_user
APP_DATABASE_PASSWORD=akeneo_pim_password
APP_INDEX_HOSTS=elasticsearch-host:9200

Step 10: Check the Akeneo 4 requirements that are fulfilled using the command.

php bin/console pim:installer:check-requirements

If this command detects something not working or not properly configured, please fix the problem before continuing.

Step 11: Install the Frontend Dependencies and assets.

php bin/console pim:installer:assets --symlink --clean
yarnpkg install
yarnpkg run webpack

Step 12: Migrate the Data

php bin/console doctrine:migration:migrate

If you are facing any issue feel free to contact us.

For More Detail Read Official Doc:

https://docs.akeneo.com/4.0/migrate_pim/upgrade_from_32_to_40.html#akeneo-pim-4-0-composer-json

Also Read:

https://webkul.com/blog/installation-akeneo-v-4-x-pim
https://webkul.com/blog/how-to-apply-a-patch-akeneo/

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home