The Algolia extension elevates the search experience of your Adobe Commerce and Magento Open Source store. It replaces the default search with an autocomplete search menu and a new search results page that updates with products and categories in real time.

View source code

Before you begin

Before you can use the Algolia extension in your Magento store, you need to create a (free) Algolia account.

You can use Algolia for Magento with Grow or Premium plans, but some features are only available in the Premium plan.

When signing up, select a data center closest to the data center of your Magento installation. This ensures better performance.

Magento 2.4 compatibility

The Magento 2.4 release introduced significant changes, including removing the MySQL search engine option.

If you’re running Magento 2.4, you must install version 3 of the Algolia extension.

To be compatible with Magento 2.4, Algolia’s extension (starting from version 3) doesn’t include backend rendering features that rely on the MySQL search adapter classes.

Older versions of the Algolia extension aren’t compatible with Magento 2.4, and are no longer supported by Algolia.

See System requirements in the Magento documentation for more information.

Installation

You can install the Algolia extension for Magento Open Source and Adobe Commerce using composer, or from the Magento Marketplace.

Install the Algolia extension with composer

Use composer to install the Algolia extension for Magento. Run the following commands:

sh
composer require algolia/algoliasearch-magento-2
php bin/magento module:enable Algolia_AlgoliaSearch
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

In developer mode, add the -f flag to the last command:

sh
php bin/magento setup:static-content:deploy -f

See General CLI installation in the Magento documentation for more information.

Install the Algolia extension from the Magento Marketplace

Go to the Magento Marketplace to get the extension and follow the instructions to install.

If you run into an error about missing dependencies while installing or upgrading through the Marketplace, resolve all dependencies by running composer update.

Installation error

The “Fatal error: Class ‘AlgoliaSearch\Version’ not found in …/AlgoliaHelper.php on line xx” error usually means that the extension has been installed incorrectly. Reinstall according to the instructions.

Configuration

To configure the Magento extension, you need the following Algolia credentials:

You can find these credentials in the Algolia dashboard.

To configure the Algolia extension, follow these steps:

  1. In the Admin panel of your Magento project, go to Stores > Algolia Search > Credentials and Basic Setup to open the configuration page for Algolia.

  2. Enter your Algolia credentials and choose a name for the Index Name Prefix.

  3. Click Save Config at the top right to save your configuration.

Indexing

After configuring the extension, start the indexing process to copy the data from your Magento store to Algolia. To do this, run the following command from the root of your Magento project:

bash
php bin/magento indexer:reindex algolia_products algolia_categories algolia_pages algolia_suggestions algolia_additional_sections