In this tutorial, I will show you how to install Magento Modules from command line, which can be like zip file, tarball file…etc. This can be applied to any Magento module without specific instruction from module vendor.
Article Contents
Install Magento Modules
After downloading the archive format of the Magento module, extract it somewhere in your computer, for instance: ~/Downloads/cool-module
.
1. Install the module
Open the file composer.json
of the extracted directory, and locate the autoload.psr-4
value. For example:
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"Swissup\\Easytabs\\": ""
}
},
You will see a value, in my case it is Swissup\\EasyTabs
. We will use this value to create a new directory to store the extension code.
Now, access into Magento project root directory, and create a new directory:
$ mkdir -p app/code/Swissup/EasyTabs
and then copy all contents from extracted directory into this newly-created directory:
$ cp -R ~/Downloads/cool-module/* ~/MAGENTO_ROOT_DIR/app/code/Swissup/EasyTabs
2. Check module status
After copying all module content into correct directory, check the status:
$ php bin/magento module:status
...
List of disabled modules:
Swissup_Core
Swissup_EasyTabs
3. Enable module
To enable the new module, execute following command:
$ php bin/magento module:enable Swissup_Core Swissup_EasyTabs
Then check the module status again.
Conclusion
Congratulation! Now you know how to install Magento modules. You can use this method to install any Magento module.