By togis39948 on
Hello Drupal Community,
I’m a new Drupal developer and would like to learn how to create a custom module in Drupal 9/10. Could someone guide me through the basic steps or share a reliable tutorial?
Here’s what I’ve tried so far:
-
Created a folder under
/modules/custom/my_module. -
Added a
my_module.info.ymlfile with basic details. -
Created a
my_module.modulefile with a simple hook.
However, my module isn’t appearing in the Extend list. Am I missing something? Any advice or resources would be greatly appreciated!
Comments
You can generate a custom
You can generate a custom module with the following Drush command:
drush generate module
And then install the module using the following command:
drush en -y [module_name]
Also, you may play with the Module Builder module.
Here is a one tutorial "Creating modules" (you can find others on youtube).
In the specific case of what
In the specific case of what you have now, did you clear cache? Can the web server read the directory/files? Start with an info.yml file from another module and modify it, your YML might be wrong.
Available for paid support, module development, migrations, consulting...