Tips for contributing code to Drupal Core

Last updated on
16 April 2025

The following tips will increase the chances of your contributions being accepted. Supplying or working on merge requests (MR) is the method of making changes to core or contributed code. Learn about merge requests and how Drupal uses GitLab in the Using GitLab to contribute to Drupal guide.

  • Start small. Review other issues and MRs and offer constructive suggestions and improvements. Tackle a few small bugs from the issue queue. Prove yourself. Before you wade in with a substantial change, develop a profile as a dependable, collaborative contributor.
  • Take a step back and objectively evaluate whether the changes are appropriate for the Drupal core. Ask yourself:
    • Is the feature already implemented? Search the forums and issue tracker.
    • Could the feature be implemented as a contributed module rather than a change to the core?
    • Will the change benefit a substantial part of the Drupal install base?
    • Is the change sufficiently general for others to build upon cleanly?
  • Be explanatory, provide descriptions and illustrations, make a solid case. Don't count on others downloading, installing, and testing your changes. Rather, show them in a nutshell what your changes could mean to them. Anticipate and address questions or concerns. If appropriate, provide screenshots.
  • Write an automated test for the change.
    • If the change introduces new functionality, ensure that that the test affirms that functionality.
    • If the change addresses a bug, ensure that the test identifies the bug and demonstrates that the MR fixes it.
  • Be open to suggestions and to other ways of accomplishing what you're aiming for. Be collaborative, friendly and respectful. Acknowledge the effort others put in.
  • Be persistent. If you don't get any response right away, don't necessarily give up. If you're still convinced your idea has merit, find another way to present it. Request another developer - ideally, one familiar with your work - to take the time to review your contribution.
  • Be responsive to suggestions, requests, or issues raised. Revise your work accordingly.
  • Make sure it still works If it has been a while since you wrote the code, make sure it still works with the current git version.

Help improve this page

Page status: No known problems

You can: