How to Create Module in Magento 2

Estimated reading time: 1 min

To create a new module in Magento 2, we need to follow next steps:

Create module folder

Create module folder within app/code with VendorName_ModuleName name, in our example, it will be MageDirect_ModuleExample

Create etc/module.xml file

Create etc/module.xml file with the next content:

Create registration.php file

Enable the module

Enable the module by running next commands :

All is done!

Now you can check your module status:


Also, look at the official documentation:

http://devdocs.magento.com/videos/fundamentals/create-a-new-module/
After reading the article need to consult with creating a new product type?
MageDirect Team is ready to help you!

Was this article helpful?
Dislike 0
Views: 10
Rate us
1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.80 out of 5)
Loading...
Top