Magento 2 install module without CLI

Introduction

Installing a module in Magento 2 typically involves using the command line interface (CLI). However, if you do not have CLI access, you can still install modules manually. This guide will show you how to install a Magento 2 module without using the CLI.

Step-by-Step Guide

Step 1: Upload the Module Files

First, upload the module files to your Magento 2 installation. Follow these steps:

  • Extract the module archive (ZIP or TAR file) on your local machine.
  • Use an FTP client to upload the extracted files to the app/code/[Vendor]/[Module] directory of your Magento 2 installation.

Step 2: Enable the Module

To enable the module, you need to update the app/etc/config.php file:

  • Open app/etc/config.php in a text editor.
  • Add the following line to the array, replacing [Vendor]_[Module] with the module’s name:
'[Vendor]_[Module]' => 1,

Step 3: Run the Setup Upgrade Script

Instead of running the CLI command, you can run the setup upgrade script via a web browser:

  • Navigate to http://your-magento-site.com/setup in your web browser.
  • Log in with your admin credentials.
  • Click on System Upgrade and follow the prompts to complete the upgrade process.

Step 4: Deploy Static Content

If needed, you can manually clear the pub/static directory to force Magento to regenerate static content:

  • Use an FTP client to navigate to the pub/static directory.
  • Delete everything except the .htaccess file.

Step 5: Clear Cache

Finally, clear the Magento cache via the admin panel:

  • Go to System > Cache Management in the admin dashboard.
  • Select all cache types and click Flush Magento Cache.

Conclusion

By following these steps, you can successfully install a Magento 2 module without using the CLI. This method is useful for environments where CLI access is restricted or unavailable.

Further Assistance

If you have any questions or encounter any issues, please leave a comment below or contact support for further assistance.

Leave a Reply

Your email address will not be published. Required fields are marked *