User Agents

Web browsers and everyday web tech, explained

How to Add Extensions to Magento: Step-by-Step

· 6 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

Adding extensions to Magento lets you add features like payment gateways, shipping methods, SEO tools, and custom functionality without coding from scratch. This guide covers the two main ways: installing from the Magento Marketplace (for Magento 2) and installing a third-party extension via Composer or manual upload. You'll need access to your Magento admin panel, SSH command-line access to your server (for most installs), and a backup of your store before starting.

What You'll Need

  • Magento 2.x installation (the steps for Magento 1 are outdated; if you're on Magento 1, consider upgrading first).
  • SSH access to your server (cPanel or similar may work for manual installs, but Composer is the recommended method).
  • Admin credentials for Magento.
  • An account on Magento Marketplace (if installing from there).
  • A backup of your store files and database (critical).
  • Composer installed on your server (for Composer-based installs).

Step-by-Step

  1. Backup your store. Before any change, create a full backup of your Magento files and database. You can use your hosting control panel or command-line tools like mysqldump and tar. This is your safety net.
  2. Identify the extension and its compatibility. Check that the extension supports your Magento version (2.3, 2.4, etc.) and PHP version. Read the extension's documentation for specific requirements.
  3. Choose your installation method. Most extensions are installed via Composer (recommended) or manually via FTP. If the extension is from the Magento Marketplace, you'll use Composer. If you have a ZIP file, you can use manual upload.
  4. Install via Composer (Marketplace or third-party repository).
    1. SSH into your server and navigate to your Magento root directory (e.g., cd /var/www/html).
    2. If using Marketplace, get your authentication keys from your Magento Marketplace account (under My Profile → Access Keys). Create a auth.json file in your Magento root with those keys, or run composer config http-basic.repo.magento.com .
    3. Run the Composer command to require the extension. For Marketplace, it looks like: composer require vendor/module-name (the exact name is in the extension's page). For third-party, it might be composer require vendor/package from a custom repository.
    4. Wait for Composer to download the files. This may take a few minutes.
  5. Install manually (ZIP file).
    1. Unzip the extension package on your local computer.
    2. Upload the entire app folder (and any other folders like pub or lib) to your Magento root directory using FTP or file manager, preserving the folder structure. Usually, you'll upload the contents of the extension's app/code directory into your Magento's app/code directory.
    3. If the extension includes a composer.json, you may need to run composer dump-autoload after uploading.
  6. Enable the extension (if needed). Some extensions require you to run php bin/magento module:enable Vendor_Module (replace with actual vendor/module name). For Composer installs, this is often automatic, but you can check with php bin/magento module:status.
  7. Run the upgrade and compile commands. In your Magento root, run the following commands in order:
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
    php bin/magento cache:flush
    These commands update the database schema, recompile code, deploy static files, and clear the cache. If you're in production mode, you may need to add --area=frontend or specify the locale, but the above works for most cases.
  8. Verify the installation. Log into your Magento admin panel. Go to Stores → Configuration → Advanced → Advanced and check if the extension appears in the module list. Also, check the frontend and backend for new menus or settings related to the extension.
  9. Configure the extension. Follow the extension's documentation to set up its settings. Usually, you'll find a new section under Stores → Configuration or a new menu item in the sidebar.
  10. Test thoroughly. Test the extension's functionality in a staging environment if possible. Check for any errors in the log files (var/log/system.log and var/log/exception.log).

Common Mistakes

  • Skipping the backup. Extensions can break your store if incompatible. Always backup.
  • Ignoring compatibility. Installing an extension for Magento 2.3 on a 2.4 store can cause fatal errors.
  • Forgetting to run setup:upgrade. This step is essential for the extension's database tables to be created.
  • Not clearing the cache. Old cache can cause the extension to not appear or behave oddly.
  • Uploading files to the wrong directory. Manual uploads must go to the correct subdirectories; otherwise, Magento won't see the module.
  • Using FTP for large extensions. File permissions can get corrupted; use Composer when possible.

Tips

  • Always install extensions in a development environment first, then deploy to production after testing.
  • Use Composer for all installs, even manual ones, by creating a composer.json for the extension if it doesn't have one.
  • Keep your Magento core and all extensions up to date to avoid security vulnerabilities.
  • Read the extension's user guide and reviews before installing. Check for recent updates and support.
  • If you're unsure about technical steps, hire a Magento developer or use a managed hosting provider that offers extension installation services.
  • After installation, check the System → Permissions → User Roles to ensure admin users have access to the new menus.

Troubleshooting

  • Extension doesn't appear in admin. Run php bin/magento module:status to see if it's enabled. If not, run php bin/magento module:enable Vendor_Module and then setup:upgrade.
  • White screen after install. Check the exception log (var/log/exception.log) for errors. Often it's a PHP compatibility issue. Revert to your backup and try a different extension version.
  • Composer errors like "Could not find package." Ensure you have the correct repository added and that the package name is correct. For Marketplace, verify your authentication keys.
  • Static content not loading. Run php bin/magento setup:static-content:deploy -f again, and ensure the pub/static directory is writable.
  • Database errors during setup:upgrade. This could be due to a conflict with another extension. Check the error message and contact the extension developer.
  • If all else fails, restore your backup. Then try installing the extension in a fresh staging environment to isolate the issue.

Frequently Asked Questions

Can I install extensions on Magento 1?

Technically yes, but Magento 1 reached end-of-life in June 2020. It's not recommended to install new extensions on Magento 1 due to security risks. Upgrade to Magento 2 first.

Do I need to pay for extensions?

There are free and paid extensions. Free ones are available on the Marketplace and GitHub, but paid ones often offer better support and updates. Always check the license.

How do I remove an extension?

Use Composer to remove it: composer remove vendor/module, then run php bin/magento setup:upgrade and cache:flush. For manual installs, delete the files and remove the module from app/etc/config.php (or run module:disable).

Will installing extensions slow down my store?

Poorly coded extensions can. Use reputable extensions, keep them updated, and test performance after installation.

Can I install an extension without SSH?

Yes, you can use FTP to upload files manually, but you still need to run the setup commands. Some hosting control panels (like cPanel) have a terminal feature, or you can use a web-based file manager and a one-click upgrade script, but it's riskier.

What is the difference between Marketplace and third-party extensions?

Marketplace extensions are vetted by Magento and installed via Composer with your Marketplace keys. Third-party extensions are from other developers; you may need to add their repository to your Composer config.