Note: This guide is “work-in-progress”. We are still exploring composer so some information presented in this section may not be optimal.
Composer is a package manager for PHP. We can use it for our WordPress theme and plugin development project. We can also use it for managing entire WordPress site.
If this is first time you are coming across a term “package manager”, then imagine it as something that will manage all third-party code libraries your project will need. Managing include downloading, updates and keeping track of sub-dependencies your library may have.
Chapters
It is advisable to read following in order:
- Getting Started
- Git and File-System Layout (non-default setup)
- Version Constraints
- Managing Themes and Plugins (for entire WordPress site)
- Updating Themes and Plugins (for entire WordPress site)
- Adding Composer Support to Your Own Themes and Plugins (for developers)
- Using Composer to Manage Own Theme/Plugin Dependencies (for developers)
To be covered
- Composer script/commands
- Composer and wp-cli
- Composer test/build script integration
Resources
Following are some amazing resources on composer which helped us a lot:
- composer.rarst.net – Composer guide for WordPress
- Official composer documentation
- Using private WordPress repositories with Composer
Update
As this section is work in progress, you may subscribe to our newsletter for updates.