WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ is licensed under the MIT license. This document outlines WP-CLI’s licensing expectations for third-party code.
Accepting third-party code into the official repository/organization
All code accepted into repositories under the official WP-CLI GitHub organization must be compatible with the MIT license. This ensures that WP-CLI can remain freely usable, modifiable, and distributable by anyone.
Bundling third-party code
When bundling third-party code directly into a WP-CLI package (i.e., copying code into the repository rather than declaring it as a dependency), the code must:
- Be licensed under an MIT-compatible license
- Include the original license file or headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. – The third-party code’s license terms must be preserved
- Maintain copyright notices – Original copyright notices must remain intact
- Be clearly identified – It should be clear which code is third-party and where it came from
When in doubt about whether to bundle third-party code, consider using it as a dependency through Composer instead.
Depending on third-party code
Third-party packages declared as dependencies (through Composer or other package managers) must be licensed under MIT-compatible licenses. This applies to both:
- Direct dependencies – Packages explicitly listed in
composer.json - Transitive dependencies – Dependencies of your dependencies
Checking dependency licenses
Before adding a new dependency:
- Check the dependency’s
LICENSEfile orcomposer.jsonfor license information - Verify that all of the dependency’s own dependencies are also compatible
- Use
composer show -tto view the dependency tree with license information, or install additional tools likecomposer/satisto runcomposer licensesfor detailed license auditing
Why these requirements?
These licensing requirements ensure that:
- WP-CLI remains free and open – Users can use, modify, and distribute WP-CLI without legal concerns
- Commercial use is permitted – Companies can use and integrate WP-CLI into their products
- No license conflicts – All code in the WP-CLI ecosystem is legally compatible
- Simplicity for users – Users don’t need to track multiple license requirements
Questions?
If you have questions about licensing or need clarification on whether a specific license is compatible, please open an issue or contact the WP-CLI maintainers.