Getting Started

Using Composer

The recommended way to start a new project is to use Composer and its create-project command. The package to target as the source project is called mwpd/plugin-boilerplate. You'll have to provide the new of the plugin to create as the second argument to the command.

$ composer create-project mwpd/plugin-boilerplate my-plugin

This will then create a new folder my-plugin, clone the into that folder and start asking you specific questions about what your plugin should be called and what it should include.

The folder of the plugin you provide should not yet exist, otherwise Composer will abort.

After you've responded to all the questions, Composer will do the required transformations, run integrity tests to make sure everything is in a workable state, and finally do the necessary clean-up to remove all the boilerplate generation logic. You're plugin is now ready to be worked on!

Last updated

Was this helpful?