Back to Top

How to Recompiling Code in Akeneo

Updated 2 April 2025

Introduction:

Akeneo is a popular Product Information Management (PIM) system used to centralize and manage product data efficiently.

To ensure optimal performance and apply code changes, it’s crucial to recompile the code in Akeneo PIM after making updates.

In this blog, we will walk through the steps How to Recompiling Code in Akeneo using specific commands.

Prerequisites:

Before you proceed with recompiling the code, ensure that you have the following prerequisites in place:

  1. Akeneo installed and configured properly.
  2. Access to the command-line interface (CLI) of your server.
  3. Familiarity with basic Unix commands and the Akeneo directory structure.

Steps Recompiling Code in Akeneo:

Step 1: Clear Cache

Searching for an experienced
Akeneo Company ?
Find out More

The first step is to clear the cache to ensure that the latest changes are reflected in the application. Use the following command:

php bin/console cache:clear --env=prod;

Step 2: Install Assets

Next, install the required assets using the PIM installer with the following command:

php bin/console pim:installer:assets --symlink --clean --env=prod;

The --symlink flag creates symbolic links to assets, making it easier to manage them. The --clean flag ensures any previous assets are removed before installing the new ones.

Step 3: Update Database Schema

If your code changes involve modifications to the database schema, you must update the database accordingly. Execute the Doctrine schema update command:

php bin/console doctrine:schema:update --force --env=prod;

The --force flag ensures that the schema update is executed without any confirmation prompts.

Step 4: Webpack Compilation

If your code changes include frontend modifications (e.g., JavaScript, CSS), you need to compile the assets using Webpack. Run the following command:

yarn run webpack;

This command will bundle and optimize your assets for production use.

Step 5: Update Extensions

If your project includes any custom extensions or modules, it’s essential to update them after code changes. Use the following command:

yarnpkg run update-extensions;

Step 6: Recompile LESS

If your project uses LESS for styling, compile the LESS files with the following command:

yarnpkg run less;

This command will process the LESS files and generate the corresponding CSS styles.

Conclusion:

Recompiling Code in Akeneo is crucial to ensure that your application reflects the latest changes and improvements.

By following the steps outlined in this blog, you can efficiently execute the necessary commands and keep your Akeneo instance up-to-date.

Always remember to back up your database and other important files before performing any code-related operations. Happy coding!

If you have any issue feel free to add a ticket and let us know your views to make the module better webkul.uvdesk.com.

. . .

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