- Set up your development environment
- See the list of relatively easy Moodle bugs
- Read our guide to making a better contribution
- Prepare a patch
- Read the Coding style policy
- Send your patch to peer review and learn more about the Moodle processes.
- Create your custom plugins looking at the information in the Plugin contribution page.
A quick start to Moodle development
Create an account on Moodle.org. You will need this to access the Moodle General Developer forum and download Moodle plugins. You can also sign up to free self-paced courses in our Moodle Academy Developer Learning Pathway
Create an account on GitHub and install Git on your computer. This is the source code version control repository tool of choice for Moodle development.
Install Moodle on your machine or use a container environment like moodle-docker. You can also use Moodle Development Kit (MDK).tip
We highly recommend that you use a database administration tool such as adminer to help you manage your development databases.
Set-up Moodle for development:
Enable the Moodle Debugger.tip
When developing in Moodle, it's recommended to turn debugging on. Only turn it off for demonstration purposes as it does have a considerable impact on the performance of your Moodle website.Attention
Always resolve all errors and warnings that show up with Moodle debugging turned on. Errors and warnings imply that something isn't working as it is supposed to which means your code isn't doing what you intended it to, or may be fragile and could break in the future.
Install the Moodle PHP CodeSniffer. This will be used to test your plugin for conformance with Moodle coding standards. Use this to develop good coding skills.
Install the Moodle PHPdoc check plugin. This will be used to test your source code documentation. This will also help improve your coding skills.Advanced
You can use Xdebug to enable step-by-step debugging in PHP. Integrations are built into many popular editors. Learn more
And finally remember these wise words from Michael Milette in the General developer forum:
Learning how to code in Moodle involves a lot of learning by example and reading other people's source code including Moodle core code. If you have a particular type of plugin in mind that you would like to create, it's recommended that you start by finding a plugin which provides similar functionality and use the process outlined above to clone it. Then customize it to suit your needs. You can even do this with 3rd party plugins found on the plugins directory. That's just one of the many advantages of developing with open source. Just always remember to give credit to the original author for his/her original hard work. [...]
Learning all of Moodle and its database takes time - maybe even years. In fact you may never come across parts of it and that's OK. Take it one step at a time and don't be afraid to ask for help when you get stuck. The only expectation by the worldwide community is that you will have tried to figure things out on your own before asking a question. Google is your friend. Just start your query with the word "moodle".
If you have any question or want to share your ideas, there are several channels you can use to communicate with other developers:
- Moodle community forums, available in different languages.
- A Matrix room available for real-time communication. Read the chat policies before joining.
- Developer meetings, organised periodically and open to anyone interested in Moodle development.
Visit our Developer FAQ page and get answers to some of our most common questions.
- Releases - versions of Moodle that have already been released
- API guides
- A (july 2017) forum thread about Getting Started with Moodle Development.