User Agents

Web browsers and everyday web tech, explained

How to Install Extensions in Magento

· 5 min read · Extensions

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Installing extensions in Magento lets you add features like payment gateways, shipping methods, SEO tools, and custom functionality without writing code from scratch. This guide covers both Magento 2 (the current version) and notes for Magento 1 (legacy). Before you start, ensure you have SSH access to your server, a backup of your store, and the extension's package (ZIP or Composer name).

What You'll Need

  • SSH (command line) access to your Magento server
  • Magento admin credentials (for cache and deployment steps)
  • The extension package (ZIP file or Composer package name)
  • Backup of your store (files and database) – essential
  • Composer installed (for Magento 2)
  • Magento file system permissions set correctly (write access for the web server user)

Step-by-Step

  1. Back up your store. Before any change, create a full backup of your Magento files and database. Use your hosting control panel or command line tools like mysqldump and tar.
  2. Put your store in maintenance mode. From the Magento root directory, run: php bin/magento maintenance:enable. This prevents customers from seeing errors during installation.
  3. Choose your installation method. For Magento 2, the recommended way is via Composer. If you have a ZIP file, you can also use the manual method (see step 5). For Magento 1, you typically upload files via FTP.
  4. Install via Composer (Magento 2). If you have the extension's Composer name (e.g., vendor/module-name), run: composer require vendor/module-name:version. If the extension is from the Magento Marketplace, you need to authenticate with your public and private keys first. Run composer config http-basic.repo.magento.com your-username your-key.
  5. Install via ZIP (manual method). Extract the ZIP file. The contents should include a folder named app/code or app/etc. Copy the entire contents to your Magento root directory, merging folders if needed. For Magento 1, upload the app and skin folders to your root.
  6. Run the upgrade scripts. After copying files, run: php bin/magento setup:upgrade. This applies any database changes the extension requires. For Magento 1, you would refresh the cache and run php shell/compiler.php compile if compilation is enabled.
  7. Compile and deploy static content (Magento 2). Run php bin/magento setup:di:compile to compile dependency injection, and php bin/magento setup:static-content:deploy to deploy static files (CSS, JS). For production mode, you may need to specify the locale, e.g., en_US.
  8. Clear the cache. Run php bin/magento cache:flush or log into the admin panel and go to System > Cache Management and flush all caches.
  9. Disable maintenance mode. Once everything is working, run: php bin/magento maintenance:disable.
  10. Test the extension. Log into the admin panel, find the extension's configuration section (usually under Stores > Configuration or a new menu item), and enable it. Test the frontend and backend thoroughly.

Common Mistakes

  • Skipping the backup. If the extension breaks your store, you'll need that backup.
  • Not using maintenance mode. Customers may see errors or half-installed files.
  • Wrong file permissions. If the web server can't read or write the extension files, you'll get blank pages or permission errors.
  • Forgetting to run setup:upgrade. This is the most common cause of "module not found" errors.
  • Installing incompatible versions. Check the extension's compatibility with your Magento version (2.3, 2.4, etc.) and PHP version.
  • Not clearing the cache. Old cached files can hide the new extension or cause conflicts.

Tips

  • Always test extensions on a staging site first if possible.
  • Read the extension's documentation for any specific installation steps.
  • Keep your Magento core and all extensions up to date to avoid security holes.
  • Use a version control system (like Git) to track changes.
  • If using Composer, always specify the exact version to avoid surprises.
  • After installation, check the Magento error log (var/log/system.log and exception.log) for any issues.

Troubleshooting

Blank page after installation: This usually indicates a PHP error. Check the var/log/exception.log file. If you can't access it, enable developer mode (php bin/magento deploy:mode:set developer) to see errors on screen.

"Module does not exist" error: This means the module isn't registered properly. Ensure the extension's registration.php file is in the correct directory and that you ran setup:upgrade.

Composer authentication errors: If the extension is from the Marketplace, re-check your public and private keys. They are case-sensitive.

Cache not clearing: If you get a "Cannot write to cache" error, check file permissions on the var/cache directory. The web server user needs write access.

Extension not showing in admin: Clear the browser cache and re-login. Also check if the extension requires enabling via a system config setting.

If everything fails: Restore your backup. That's why you made it.

Frequently Asked Questions

Can I install extensions without SSH access?

Yes, you can use the manual upload method via FTP, but you will still need to run the upgrade scripts. Some hosting providers offer a web-based tool like Magento Admin or a custom installer, but SSH is the most reliable.

How do I uninstall an extension?

For Composer-installed extensions, run composer remove vendor/module-name, then run php bin/magento setup:upgrade. For manual installations, delete the extension's files and run the same upgrade command.

Will installing an extension slow down my store?

It depends on the extension's code quality. Poorly coded extensions can add overhead. Always choose reputable developers and monitor performance after installation.

Do I need to reinstall extensions after a Magento upgrade?

Usually no, but you should check compatibility. After upgrading Magento core, run setup:upgrade again and clear caches. Some extensions may require updates from their developers.

Can I install multiple extensions at once?

Yes, but it's safer to install one at a time and test each. This makes it easier to identify which extension causes issues.

What is the difference between a module and an extension?

In Magento, an extension is a package that contains one or more modules. A module is a piece of code that adds specific functionality. You install extensions, which may contain multiple modules.