Drupal custom module development — when it makes sense and what it costs
Drupal has thousands of contributed modules — but sometimes none of them cover the exact need. Here is when a custom module is the right choice and what it means.
When a custom module is the right choice
Drupal.org has over 50,000 modules. Before commissioning custom development it is always worth checking:
- Is there an existing module that does this?
- Can an existing module be configured to cover the need?
- Can the module's behaviour be extended through hooks or plugins?
If the answer to all three is "no" — a custom module is the right choice.
Typical reasons to build a custom module:
- Integration with a specific external system (ERP, CRM, payment gateway)
- Business logic unique to the organisation
- Performance-critical functionality that a general module does not optimise enough
- You need precise control over behaviour without extra dependencies
Custom module structure
A Drupal module needs at minimum two files:
`` modules/custom/my_module/ my_module.info.yml # Module metadata my_module.module # Hooks and core logic (may be absent) ``
Larger modules add:
src/— PHP classes (Controller, Form, Service, Plugin)my_module.routing.yml— URLs and pagesmy_module.services.yml— servicesconfig/— default configurationtemplates/— Twig templatestests/— unit tests
Module development stages
1. Analysis (0.5–2 days)
What exactly is needed? Which Drupal APIs does it interact with? Are there existing modules to build on?
2. Development (1–10 days depending on complexity)
Simple integration (e.g. external API call and displaying the result): 1–2 days
Custom form with workflows (e.g. application form that sends email, creates a node, notifies admin): 2–4 days
Complex business logic (e.g. automated pricing, ticketing system, document management): 5–15 days
3. Tests
Unit tests, integration tests. At minimum thorough manual testing across all environments.
4. Documentation
What the module does, how to configure it, what to remember during upgrades.
Cost
Based on hourly rates (see our pricing page):
- Simple module (1–2 days): €800–1,600
- Medium module (3–5 days): €2,400–4,000
- Complex module (5–15 days): €4,000–12,000
Prices cover development and basic testing. Documentation, maintenance, and further development are separate.
Long-term considerations
A custom module means:
- Responsibility stays with you — drupal.org security updates do not cover custom modules
- Drupal version upgrades — the custom module must be updated alongside Drupal
- Documentation is critical — a year later you need to remember why something was built a certain way
A well-written custom module is well-documented, covered by tests, and has clear dependencies. A module written in a rush creates more work in future than it saves now.
If you have a specific need, describe it briefly and we will assess whether a custom module is the best solution.
Kaido Toomingas
WebPro Company OÜ
Need Drupal help?
If the article describes your situation, you do not have to read everything first. A real person will help you choose the next step.