How to install the Shipping Costs Based on Distance extension using Composer

Step-by-Step Installation of Magento 2 Extensions via Composer

Important: If the plugin was purchased from the Adobe Marketplace, this installation method does not apply. The steps outlined below are only for orders placed directly via our site.

Installing Magento extensions using Composer is the preferred method due to its ability to manage dependencies, ensure version compatibility, and streamline the update process. Composer simplifies the installation and management of PHP packages, making it an essential tool for Magento development.

Get the Details

  1. Log in to your account to obtain your Composer Authentication Keys and Credentials, which are automatically generated after purchasing one of our extensions.

  2. You can also create new Composer keys with a description if you want to change environments and keys.

Backup (Optional but Recommended)

We strongly recommend testing your installation in a development environment prior to releasing it to production. Additionally, ensure you have a full backup of your store available in case you need to perform a rollback.

Add the Magmodules Composer Repository via SSH

The next step is to add the packages.magmodules.eu repository to your Composer configuration.

Add Repository by SSH

Through an SSH connection, run the following command from your Magento installation directory to connect with our private repository:

composer config repositories.magmodules composer https://packages.magmodules.eu/

After executing this command, a blank line will appear, indicating that the repository has been successfully added to your composer.json file.

If you prefer to add the Composer repository manually, please refer to your account for the exact commands.

Install and Activate the Extension via Composer

Once the Magmodules repository has been added to your composer.json, you can install any packages available through it. If preferred, you may enable maintenance mode before continuing.

Download Extension

To download the extension into your Magento installation, run the following command from the Magento root directory:

composer require magmodules/magento2-distance-based-shipping

If no Composer authentication keys are configured yet, you will be prompted to enter the username and password. These Composer Auth Keys can be obtained from your Magmodules account: Magmodules Auth Keys

Install Extension

After the extension has been downloaded, install and activate the Shipping Costs Based on Distance extension by executing the following commands:

php bin/magento module:enable 
php bin/magento setup:upgrade

If your Magento store is running in production mode, you must recompile and deploy static content:

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

It is recommended to clear the Magento cache after installation:

php bin/magento cache:flush

Once these commands have been executed successfully, the extension is installed and ready for configuration. You can now configure the extension via: Stores → Configuration → Magmodules → Shipping Costs Based on Distance

Update or Remove the Extension via Composer

Once the extension is installed via Composer, you can easily update it, switch to a specific version, or remove it entirely. Composer ensures that dependencies are handled correctly, making updates safe and consistent across your Magento installation.

Update to the Latest Version

composer update magmodules/magento2-distance-based-shipping

Update to a Specific Version

composer require magmodules/magento2-distance-based-shipping:x.y.z

Remove the Extension

composer remove magmodules/magento2-distance-based-shipping

After updating or removing an extension, run the following commands:

php bin/magento setup:upgrade
php bin/magento cache:flush

If you are in production mode, also execute:

php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
Created:
Updated:
star star star star star
star star star star star
Alexandru-Manuel Carabus
Magmodules sets the bar for Magento module quality and support—we check their catalog first for client feature requests, and they’re our first choice for licenses.
Google 23 days ago
star star star star star
star star star star star
Matt Austin
Possibly the fastest support response times of any Magento Extension vendor. Great extensions too!
Google 09 Sep 2025
star star star star star
star star star star star
Jan Privé
Dankzij de heldere uitleg en snelle reactie van Magmodules kon mijn vraag, en dus mijn Magento-probleem, binnen enkele uren worden beantwoord. Doeltreffend, zonder moeilijke termen, gewoon zo als het zou moeten zijn.... Bedankt!
Google 05 Sep 2025
star star star star star
star star star star star
Denis Metzler
To evaluate a provider, it is not enough to consider only the product offered, but also its after-sales service, such as support and troubleshooting. Magmodules has been extremely satisfactory at all levels on multiple occasions and sets the bar at the top when comparing the competition.
Google 02 Sep 2025
star star star star star
star star star star star
Bleijenberg winkelinrichting en materialen
Goed bereikbaar, reageren snel en denken oplossingsgericht. Een aanrader.
Google 30 Jul 2025
star star star star star
star star star star star
Patrick Verduijn
Magmodules biedt plugins aan die van hoge kwaliteit zijn tegen een goede prijs, waar dit bedrijf in uitblinkt is de bereidheid om de zeldzame feedback & problemen met de plugins te willen onderzoeken, mee te willen denken in het debuggen van problemen en goede oplossingen toe te passen. In mijn decennium ervaring met Magento & 3th parties is Magmodules absoluut een uniqum binnen de markt.
Google 25 Jul 2025
star star star star star
star star star star star
Erik de Groot
Magemodules heeft hele sterke Magento extensies en een proactieve support. Al jaren heel erg tevreden over jullie service en producten!
Google 18 Jul 2025
star star star star star
star star star star star
René Zeuner
We are using the Mollie Magento extension from Magmodules. It works excellently without flaws. Very fast, competent and friendly support. Thanks!
Google 30 Jun 2025
star star star star star
star star star star star
R. U.
Erg goed team, reageren snel en duidelijk en hebben met toegang tot onze database erg goed geholpen (eigenlijk een gratis customization).
Google 18 Jun 2025
star star star star star
star star star star star
Hugo de Groot
Uitstekende support! Wij gebruiken o.a. de Rich Snippets Suite extensie voor onze Magento 2 webshop (Hyvä) en hadden een specifieke vraag over structured data op PLP-pagina’s. Binnen no-time kregen we een inhoudelijk en duidelijk antwoord. Zeer prettig contact en goed onderbouwde uitleg. Absoluut een betrouwbare partner voor Magento-extensies!
Google 13 Jun 2025