A Comprehensive Guide to Installing and Enabling Magento 2 Multi-Source Inventory (MSI)

As an experienced Magento 2 senior developer, I understand the significance of efficient inventory management for an e-commerce store. One powerful tool that Magento 2 offers is the Multi-Source Inventory (MSI) feature. As we discussed in this blog post, MSI allows you to manage and track inventory across multiple physical locations or warehouses seamlessly.

In this blog post, we will delve into the step-by-step process of installing and enabling the Magento 2 Multi-Source Inventory packages.

Prerequisites

Before proceeding with the installation, ensure that your system meets the following prerequisites:

  1. A Magento 2 installation (preferably one of the latest versions).
  2. SSH access or command line access to your server.
  3. The Composer needs to be installed on your server.

Step 1: Backup Your Magento 2 Installation

Before making any significant changes to your Magento 2 installation, it’s always a good practice to create a backup. This ensures that you can revert to a stable state in case of any issues during the installation process. This step is optional but highly recommended to avoid any loss of data.

Another high-recommended step is that you should never do this directly in production, always use either a staging or development environment before doing this in production to make sure it will work smoothly.

Step 2: Update Composer

Run the following command to update Composer to the latest version:

composer self-update

Step 3: Install the Multi-Source Inventory Packages

Using Composer, install the Magento Inventory Management module by executing the following command:

composer require magento/inventory-composer-metapackage

Step 4: Enable the Multi-Source Inventory Module

Once the modules are installed, enable them by executing the following commands in the Magento 2 root directory:

php bin/magento module:enable Magento_Inventory \
    Magento_InventoryAdminUi \
    Magento_InventoryAdvancedCheckout \
    Magento_InventoryApi \
    Magento_InventoryBundleImportExport \
    Magento_InventoryBundleProduct \
    Magento_InventoryBundleProductAdminUi \
    Magento_InventoryBundleProductIndexer \
    Magento_InventoryCache \
    Magento_InventoryCatalog \
    Magento_InventoryCatalogAdminUi \
    Magento_InventoryCatalogApi \
    Magento_InventoryCatalogFrontendUi \
    Magento_InventoryCatalogSearch \
    Magento_InventoryCatalogSearchBundleProduct \
    Magento_InventoryCatalogSearchConfigurableProduct \
    Magento_InventoryConfigurableProduct \
    Magento_InventoryConfigurableProductAdminUi \
    Magento_InventoryConfigurableProductFrontendUi \
    Magento_InventoryConfigurableProductIndexer \
    Magento_InventoryConfiguration \
    Magento_InventoryConfigurationApi \
    Magento_InventoryDistanceBasedSourceSelection \
    Magento_InventoryDistanceBasedSourceSelectionAdminUi \
    Magento_InventoryDistanceBasedSourceSelectionApi \
    Magento_InventoryElasticsearch \
    Magento_InventoryExportStock \
    Magento_InventoryExportStockApi \
    Magento_InventoryGraphQl \
    Magento_InventoryGroupedProduct \
    Magento_InventoryGroupedProductAdminUi \
    Magento_InventoryGroupedProductIndexer \
    Magento_InventoryImportExport \
    Magento_InventoryIndexer \
    Magento_InventoryInStorePickup \
    Magento_InventoryInStorePickupAdminUi \
    Magento_InventoryInStorePickupApi \
    Magento_InventoryInStorePickupFrontend \
    Magento_InventoryInStorePickupGraphQl \
    Magento_InventoryInStorePickupMultishipping \
    Magento_InventoryInStorePickupQuote \
    Magento_InventoryInStorePickupQuoteGraphQl \
    Magento_InventoryInStorePickupSales \
    Magento_InventoryInStorePickupSalesAdminUi \
    Magento_InventoryInStorePickupSalesApi \
    Magento_InventoryInStorePickupShipping \
    Magento_InventoryInStorePickupShippingAdminUi \
    Magento_InventoryInStorePickupShippingApi \
    Magento_InventoryInStorePickupWebapiExtension \
    Magento_InventoryLowQuantityNotification \
    Magento_InventoryLowQuantityNotificationAdminUi \
    Magento_InventoryLowQuantityNotificationApi \
    Magento_InventoryMultiDimensionalIndexerApi \
    Magento_InventoryProductAlert \
    Magento_InventoryQuoteGraphQl \
    Magento_InventoryRequisitionList \
    Magento_InventoryReservationCli \
    Magento_InventoryReservations \
    Magento_InventoryReservationsApi \
    Magento_InventorySales \
    Magento_InventorySalesAdminUi \
    Magento_InventorySalesApi \
    Magento_InventorySalesFrontendUi \
    Magento_InventorySetupFixtureGenerator \
    Magento_InventoryShipping \
    Magento_InventoryShippingAdminUi \
    Magento_InventorySourceDeductionApi \
    Magento_InventorySourceSelection \
    Magento_InventorySourceSelectionApi \
    Magento_InventorySwatchesFrontendUi \
    Magento_InventoryVisualMerchandiser \
    Magento_InventoryWishlist

Run the setup:upgrade command:

php bin/magento setup:upgrade

Step 5: Compile and Deploy the Magento 2 MSI Module

After enabling the MSI modules, compile and deeply the changes by executing the following commands:

php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

Step 6: Verify the Installation

To ensure that the MSI module is installed correctly, run the following command:

php bin/magento module:status

You should see the Magento_Inventory module listed as enabled.

Actually, this will install a couple of modules in your Magento 2 store, here are the modules you should see:

  • Magento_Inventory
  • Magento_InventoryAdminUi
  • Magento_InventoryAdvancedCheckout
  • Magento_InventoryApi
  • Magento_InventoryBundleImportExport
  • Magento_InventoryBundleProduct
  • Magento_InventoryBundleProductAdminUi
  • Magento_InventoryBundleProductIndexer
  • Magento_InventoryCache
  • Magento_InventoryCatalog
  • Magento_InventoryCatalogAdminUi
  • Magento_InventoryCatalogApi
  • Magento_InventoryCatalogFrontendUi
  • Magento_InventoryCatalogSearch
  • Magento_InventoryCatalogSearchBundleProduct
  • Magento_InventoryCatalogSearchConfigurableProduct
  • Magento_InventoryConfigurableProduct
  • Magento_InventoryConfigurableProductAdminUi
  • Magento_InventoryConfigurableProductFrontendUi
  • Magento_InventoryConfigurableProductIndexer
  • Magento_InventoryConfiguration
  • Magento_InventoryConfigurationApi
  • Magento_InventoryDistanceBasedSourceSelection
  • Magento_InventoryDistanceBasedSourceSelectionAdminUi
  • Magento_InventoryDistanceBasedSourceSelectionApi
  • Magento_InventoryElasticsearch
  • Magento_InventoryExportStock
  • Magento_InventoryExportStockApi
  • Magento_InventoryGraphQl
  • Magento_InventoryGroupedProduct
  • Magento_InventoryGroupedProductAdminUi
  • Magento_InventoryGroupedProductIndexer
  • Magento_InventoryImportExport
  • Magento_InventoryIndexer
  • Magento_InventoryInStorePickup
  • Magento_InventoryInStorePickupAdminUi
  • Magento_InventoryInStorePickupApi
  • Magento_InventoryInStorePickupFrontend
  • Magento_InventoryInStorePickupGraphQl
  • Magento_InventoryInStorePickupMultishipping
  • Magento_InventoryInStorePickupQuote
  • Magento_InventoryInStorePickupQuoteGraphQl
  • Magento_InventoryInStorePickupSales
  • Magento_InventoryInStorePickupSalesAdminUi
  • Magento_InventoryInStorePickupSalesApi
  • Magento_InventoryInStorePickupShipping
  • Magento_InventoryInStorePickupShippingAdminUi
  • Magento_InventoryInStorePickupShippingApi
  • Magento_InventoryInStorePickupWebapiExtension
  • Magento_InventoryLowQuantityNotification
  • Magento_InventoryLowQuantityNotificationAdminUi
  • Magento_InventoryLowQuantityNotificationApi
  • Magento_InventoryMultiDimensionalIndexerApi
  • Magento_InventoryProductAlert
  • Magento_InventoryQuoteGraphQl
  • Magento_InventoryRequisitionList
  • Magento_InventoryReservationCli
  • Magento_InventoryReservations
  • Magento_InventoryReservationsApi
  • Magento_InventorySales
  • Magento_InventorySalesAdminUi
  • Magento_InventorySalesApi
  • Magento_InventorySalesFrontendUi
  • Magento_InventorySetupFixtureGenerator
  • Magento_InventoryShipping
  • Magento_InventoryShippingAdminUi
  • Magento_InventorySourceDeductionApi
  • Magento_InventorySourceSelection
  • Magento_InventorySourceSelectionApi
  • Magento_InventorySwatchesFrontendUi
  • Magento_InventoryVisualMerchandiser
  • Magento_InventoryWishlist

Note: the number of modules may differ depending on which version you’re installing. For more information, you can check the official repository of the Inventory project on GitHub.

Step 7: Configure Multi-Source Inventory

To configure the Multi-Source Inventory settings, log in to your Magento 2 admin panel and navigate to Stores > Configuration > Inventory > Stock Options. Here, you can configure various options related to stock management and source selection.

Conclusion

By following this step-by-step guide, you have successfully installed and enabled the Magento 2 Multi-Source Inventory feature. This powerful tool will allow you to manage inventory across multiple sources, warehouses, or physical locations efficiently. Take advantage of MSI to streamline your inventory management process and provide a seamless.

Leave a comment