This article explains how to install the Swap Magento Extension on a Magento 2 instance. Installation requires server access and should be performed by a developer familiar with managing Magento environments.
Before you begin
Before starting, ensure your Magento 2 store is running correctly and you have full server access. You will also need the latest Swap Magento Extension ZIP file, which the Swap team provides during onboarding.
Uploading the extension to the server
Upload the extension package to your Magento server. Place the ZIP file inside the app/code directory of your Magento installation.
Example command to upload the file:
scp swap_module-1.0.0.zip {user}@{host}:{MAGENTO_PATH}/app/code/Swap
Replace {user}, {host}, and {MAGENTO_PATH} with your server details.
Extracting the extension files
Connect to the server via SSH, navigate to the directory containing the ZIP, and extract the files:
unzip -o swap_module-1.0.0.zip
If upgrading from a previous version, remove the existing extension files first:
rm -rf {MAGENTO_PATH}/app/code/Swap/Extension/*
Enabling the extension
After extracting the files, run the following Magento CLI commands in order:
php {MAGENTO_PATH}/bin/magento module:enable Swap_Extension
php {MAGENTO_PATH}/bin/magento setup:upgrade
php {MAGENTO_PATH}/bin/magento setup:di:compile
php {MAGENTO_PATH}/bin/magento setup:static-content:deploy -f
php {MAGENTO_PATH}/bin/magento cache:flush
Each command ensures Magento recognises the new extension, compiles the necessary code, and clears its caches.
Verifying installation
Confirm the extension is installed and enabled:
php {MAGENTO_PATH}/bin/magento module:status Swap_Extension
If installation was successful, Magento will report that the module is enabled.
Next steps
Once installed, the store admin can proceed with configuration from the Magento Admin Panel. See How to configure the Swap Magento Extension for details.
If you encounter any issues during installation, contact your Swap onboarding manager.