Skip to content

roots/wp-packages

WP Packages

Build status Follow Roots Sponsor Roots

A modern, community-funded Composer repository for WordPress plugins and themes.

Support us

Roots is an independent open source org, supported only by developers like you. Your sponsorship funds WP Packages and the entire Roots ecosystem, and keeps them independent. Support us by purchasing Radicle or sponsoring us on GitHub — sponsors get access to our private Discord.

Sponsors

Carrot WordPress.com Itineris Kinsta

Package Naming

Type Convention Example
Plugin wp-plugin/plugin-name wp-plugin/woocommerce
Theme wp-theme/theme-name wp-theme/twentytwentyfive

Usage

Add the repository to your composer.json:

{
  "repositories": [
    {
      "name": "wp-packages",
      "type": "composer",
      "url": "https://repo.wp-packages.org",
      "only": ["wp-plugin/*", "wp-theme/*"]
    }
  ],
  "require": {
    "composer/installers": "^2.2",
    "wp-plugin/woocommerce": "^10.0",
    "wp-theme/twentytwentyfive": "^1.0"
  },
  "extra": {
    "installer-paths": {
      "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
      "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
      "web/app/themes/{$name}/": ["type:wordpress-theme"]
    },
    "wordpress-install-dir": "web/wp"
  },
  "config": {
    "allow-plugins": {
      "composer/installers": true,
      "roots/wordpress-core-installer": true
    }
  }
}
  • composer/installers — installs plugins and themes into their correct WordPress directories instead of vendor/
  • extra.installer-paths — maps package types to your WordPress content directory (adjust paths to match your project structure)
  • extra.wordpress-install-dir — tells roots/wordpress-core-installer where to install WordPress core

Roots WordPress Packages

WP Packages is built by Roots and is the recommended repository for use alongside the Roots WordPress packaging ecosystem:

Package Description
roots/wordpress Meta-package for installing WordPress core via Composer
roots/wordpress-full Full WordPress build (core + default themes + plugins + betas)
roots/wordpress-no-content Minimal WordPress build (core only)
roots/bedrock WordPress boilerplate with Composer, better config, and improved structure

A typical Bedrock project uses roots/wordpress for WordPress core and WP Packages for plugins and themes:

{
  "repositories": [
    {
      "name": "wp-packages",
      "type": "composer",
      "url": "https://repo.wp-packages.org",
      "only": ["wp-plugin/*", "wp-theme/*"]
    }
  ],
  "require": {
    "composer/installers": "^2.2",
    "roots/wordpress": "^6.9",
    "wp-plugin/woocommerce": "^10.0",
    "wp-plugin/turn-comments-off": "^2.0"
  },
  "extra": {
    "installer-paths": {
      "web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
      "web/app/plugins/{$name}/": ["type:wordpress-plugin"],
      "web/app/themes/{$name}/": ["type:wordpress-theme"]
    },
    "wordpress-install-dir": "web/wp"
  },
  "config": {
    "allow-plugins": {
      "composer/installers": true,
      "roots/wordpress-core-installer": true
    }
  }
}

Migrating from WPackagist

  1. Remove wpackagist packages: composer remove wpackagist-plugin/woocommerce
  2. Update your repository URL in composer.json (see above)
  3. Add with new naming: composer require wp-plugin/woocommerce

Or use the migration script to automatically update your composer.json:

curl -sO https://raw.githubusercontent.com/roots/wp-packages/main/scripts/migrate-from-wpackagist.sh && bash migrate-from-wpackagist.sh

Community

About

A modern, community-funded Composer repository for WordPress plugins and themes

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors