Skip to main content

How to upgrade extension

Follow the steps below to update the extension to the latest version available for you.

warning

Please note that these instructions are valid for Magento 2.4 only. For installing the extension on an earlier version of Magento, please follow:

Execute the following commands to update the extension via composer:​

  1. Back up your store's database and web directory.

  2. Log in to the SSH console of your server and navigate to the root directory of the Magento 2 store.

  3. Run the command below to update the current extension with all dependencies:

    composer require mirasvit/module-search-ultimate:* --update-with-dependencies

    If mirasvit/module-search-ultimate-hyva is installed, you don't have to remove it first. From version 2.9.0 Hyvä support ships inside the extension itself, and composer takes the old package off during this update. No settings are lost, and setup:upgrade removes the retired Hyva_MirasvitSearch, Hyva_MirasvitSearchAutocomplete and Hyva_MirasvitMisspell module names from app/etc/config.php for you.

    If the Hyvä compatibility module hyva-themes/magento2-mirasvit-search-autocomplete is installed, composer refuses the update because the extension conflicts with it. Remove it first with composer remove hyva-themes/magento2-mirasvit-search-autocomplete.

    From version 2.9.3 the extension no longer needs the mirasvit/module-report package: the old Search Terms and Search Volume reports are replaced by the extension's own reports at System -> Search Management -> Reports, and your search history is kept. Composer removes the package during the update if no other Mirasvit extension needs it, and setup:upgrade removes the retired Mirasvit_Report module name from app/etc/config.php.

    In some cases, the commands above may not be applicable, or you may be unable to update only the current module. If that's the case, you will need to upgrade all Mirasvit modules in a bundle. The command above will have no effect in such scenarios. Instead, run the following commands to update all Mirasvit modules installed in your store:

    composer update mirasvit/*
  4. Install the updates by running the following command:

    php -f bin/magento setup:upgrade

    The command also registers and enables the modules that are new in this version, such as Mirasvit_AiCore and Mirasvit_SearchAi of the AI search features, and removes module names that no longer exist from app/etc/config.php.

    note

    The AI search features stay inactive after the upgrade until you configure them: AI Semantic Search and AI Image Search are disabled by default, and the AI Image Search button appears on the storefront only once Enabled is set to Yes, an OpenAI API key is set and the product vectors are built. See How to set up AI image search and How to set up AI semantic search.

  5. On a Hyvä storefront, rebuild the theme assets. The autocomplete and the search pages take their Hyvä styles from the extension's own Tailwind source, and the theme picks them up only when Tailwind runs again:

    php -f bin/magento hyva:config:generate
    cd /path/to/theme/web/tailwind/
    npm run build
    cd /path/to/project/

    On a theme older than Hyvä 1.4, run npm run build-prod instead.

  6. Deploy static view files:

    rm -rf pub/static/*; rm -rf var/view_preprocessed/*;
    php -f bin/magento setup:static-content:deploy
  7. Run the command below to clean the cache:

    php -f bin/magento cache:clean
  8. Rebuild the search index:

    php -f bin/magento indexer:reindex catalogsearch_fulltext