WordPress Monorepos

Note: this guide is currently work in progress!

Using a single Git repository for maintaining all your components is a great way to speed up development, ensure consistency and handle releases. It is an alternative to the traditional “manyrepo” approach where any changes to individual packages, their dependencies, linting, testing and local development environments are managed and repeated at the package level.

It is important to note that using monorepos doesn’t completely remove the complexity of managing multiple packages — it only reduces it by shifting the point of knowledge and control to a central location.

WordPress Monorepo Examples

Here are a few examples of mono repos in the WordPress ecosystem (leave a comment below if you know more examples):

Interestingly, they all use different tooling to:

  • split out the individual packages into their read-only release repositories,
  • create changelogs and manage versioning.

Monorepo Setup

Setting up monorepos requires a lot of common workflows and conventions for how individual packages get from development to being released.

WordPress monorepos setup