How to install the Shipping Costs Based on Distance extension through FTP
Preparation Installing Extension via FTP
If possible, we advise installing the module via Composer, as this is the most efficient and reliable method. Composer makes updates significantly easier to manage and ensures your store always uses the correct, versioned dependencies.
Before making changes to your store, please ensure the following:
- Ensure you have a full backup (files + database).
- Run the installation in a development or staging environment first.
- (Production only) Enable maintenance mode to prevent visitors from seeing errors:
php bin/magento maintenance:enable
Upload Extension Files
Download the Shipping Costs Based on Distance extension package (.zip) file from your Magmodules dashboard under "My Downloads" and follow the installation steps outlined below.
The ZIP file contains the necessary files that must be placed inside the Magmodules/DistanceBasedShipping folder. Note: The directory structure is case-sensitive and must be created manually. Follow the steps below to extract and upload the files correctly.
1. Extract the Extension Files
Unzip the extension package using a tool like WinZip, WinRAR, or a similar extraction program.
2. Upload the Unzipped Extension Files
Since the extracted files contain only the extension content, you must manually create the Magmodules/DistanceBasedShipping folder inside app/code/ on your server and place all extracted files into this final Magmodules/DistanceBasedShipping folder.
The final directory path for the uploaded content will be:
app/code/Magmodules/DistanceBasedShipping
If you are updating an existing installation of one of our extensions, ensure that you overwrite the existing extension files.
Run Setup Commands in the Terminal
Open the terminal and run the following command, then enter the user password. (Skip this step if you're installing the expansion on a local machine):
ssh username@domain.com
Locate The Root
Navigate to the Magento 2 web root directory by executing this command:
cd /full_path_to_magento2
Examples of typical Magento roots:
/var/www/html/home/username/public_html/var/www/magento2
Start Setup
Once the extension has been successfully downloaded, initiate the setup of the Shipping Costs Based on Distance extension using the following commands:
php bin/magento module:enable
php bin/magento setup:upgrade
This registers the module and processes database changes.
If Magento is in production mode, you’ll need to recompile and deploy static content by running:
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
After executing these commands, the extension is installed and ready for configuration. To configure it, go to Stores > Configuration > Magmodules > Shipping Costs Based on Distance.
If you have used the maintenance mode, make sure to disable this; otherwise, Magento frontend returns a 503 Service Temporarily Unavailable error:
php bin/magento maintenance:disable
Start Using the Extension
Once the installation is complete, the extension is successfully installed in your Magento® 2 store and ready to use.
Navigate to Stores > Configuration > Magmodules > Shipping Costs Based on Distance to configure and start using the extension.

