What is a Magento extension?
Magento is software for running an online shop. An extension is an add-on that gives your shop a new feature, such as a payment method or a new report. The command line is a window where you type instructions instead of clicking buttons.
You need SSH access (a safe way to type commands on a server). If you are not sure your plan includes SSH, ask Hostvento support.
Warning
Installing an extension changes your shop. Take a full backup of your files and database first. Try the extension on a test copy if you can.
Steps for Composer extensions
Composer is a tool that downloads PHP add-ons. Most extensions from the Magento Marketplace (the official add-on store) install this way.
- Connect to your server with SSH.
- Go to your Magento folder:
cd /path/to/your/magento
Use your own path.
- Put the shop in maintenance mode. Visitors then see a notice and not a half-finished page:
php bin/magento maintenance:enable
- Download the extension. Use the package name from the extension's page:
composer require vendor/module-name
Composer may ask for your Magento Marketplace access keys. You create these in your Marketplace account.
- Turn the extension on and update the database:
php bin/magento module:enable Vendor_ModuleName
php bin/magento setup:upgrade
The first line switches the module on. The second one updates your database for it.
- Rebuild the compiled code (only needed in production mode):
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
These steps prepare the code and design files. They can take several minutes.
- Clear the cache:
php bin/magento cache:flush
- Turn maintenance mode off:
php bin/magento maintenance:disable
If you have a ZIP file instead
Unzip it into app/code/Vendor/ModuleName. Then run steps 5 to 8.
Quick recap
- Back up first.
- Turn on maintenance mode.
- Add the extension with
composer require. - Run
module:enableandsetup:upgrade. - Compile, deploy files, flush the cache.
- Turn maintenance mode off.