Composer and WordPress

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:

To be covered

  1. Composer script/commands
  2. Composer and wp-cli
  3. Composer test/build script integration

Resources

Following are some amazing resources on composer which helped us a lot:

  1. composer.rarst.net – Composer guide for WordPress
  2. Official composer documentation
  3. Using private WordPress repositories with Composer

Update

As this section is work in progress, you may subscribe to our newsletter for updates.