<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lê Vĩnh Kỳ</title>
    <description>The latest articles on DEV Community by Lê Vĩnh Kỳ (@levinhky).</description>
    <link>https://dev.to/levinhky</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F983627%2F48fe2172-343f-45d8-a8e1-534648eb7414.jpeg</url>
      <title>DEV Community: Lê Vĩnh Kỳ</title>
      <link>https://dev.to/levinhky</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/levinhky"/>
    <language>en</language>
    <item>
      <title>How to Create Module in Magento 2</title>
      <dc:creator>Lê Vĩnh Kỳ</dc:creator>
      <pubDate>Thu, 30 Mar 2023 04:00:40 +0000</pubDate>
      <link>https://dev.to/levinhky/how-to-create-module-in-magento-2-2o6c</link>
      <guid>https://dev.to/levinhky/how-to-create-module-in-magento-2-2o6c</guid>
      <description>&lt;p&gt;We will discuss the topic of how to create simple module called **Kyle Wiley **in Magento 2&lt;/p&gt;

&lt;p&gt;There are 2 things must have when create Magento module: module.xml, registration.php&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create the folder of Kyle Wiley module
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; app/code/Kyle/Wiley
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So it's gonna be like Kyle_Wiley, Kyle_Wiley it's module name&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Create etc/module.xml file.
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/code/Kyle/Wiley/etc/module.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Content would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"&amp;gt;
    &amp;lt;module name="Kyle_Wiley"&amp;gt;
    &amp;lt;/module&amp;gt;
&amp;lt;/config&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Create registration.php file
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;app/code/Kyle/Wiley/registration.xml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Content would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Kyle_Wiley',
    __DIR__
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Enable our new module
&lt;/h2&gt;

&lt;p&gt;Finish the step 3, we have already created the Kyle_Wiley module. And we will enable this module in this step&lt;/p&gt;

&lt;p&gt;After create the module if you run the command as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bin/magento module:enable Kyle_Wiley
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And for sure you should run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bin/magento setup:upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>magento</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
