What is a Magento module?
A module is a logical group – that is, a directory containing blocks, controllers, helpers, models – that are related to a specific business feature. In keeping with Magento’s commitment to optimal modularity, a module encapsulates one feature and has minimal dependencies on other modules.
Modules and themes are the units of customization in Magento. Modules provide business features, with supporting logic, while themes strongly influence user experience and storefront appearance. Both components have a life cycle that allows them to be installed, deleted, and disabled. From the perspective of both merchants and extension developers, modules are the central unit of Magento organization.
The Magento Framework provides a set of core logic: PHP code, libraries, and the basic functions that are inherited by the modules and other components.
The purpose of each module is to provide specific product features by implementing new functionality or extending the functionality of other modules. Each module is designed to function independently, so the inclusion or exclusion of a particular module does not typically affect the functionality of other modules.
A module is a directory that contains the PHP and XML files (blocks, controllers, helpers, models) that are related to a specific business feature, such as Shipping. Specifically, a Magento module is composed of these software components: themes, libraries, and language packages.
See Module anatomy for an overview of module structure.
Where do modules live?
Modules typically live in the
app/code directory of a Magento installation, in a directory with the following PSR-0 compliant format:
app/code/<Vendor>/<ModuleName>. For example, the Customer module of Magento can be found at
Inside this folder, you will find all the code related to this module, including the
etc/module.xml file, which contains the name and version of the module, as well as any dependencies.
The standard placement of the
<ModuleName> directory within the overall Magento file structure is
app/code/<Vendor>/<ModuleName>. However, if you are creating a new module for distribution, you can just create the
<ModuleName> directory and the required directories within it.
Working with modules
Magento developers, administrators, and anyone building a Magento web site will want to review all relevant topics surrounding their particular goals and use cases.
See PHP Developer Guide for specific instructions on extending modules.
See Frontend Developer Guide for information on implementing themes and other components.