Skip to content

roots/wp-packages

WP Packages

Build status Follow Roots Sponsor Roots

Manage your WordPress plugins and themes with Composer.

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

WP Packages WPackagist
Package naming wp-plugin/* wp-theme/* wpackagist-plugin/* wpackagist-theme/*
Package metadata Includes authors, description, homepage, and support links Missing — requested since 2020
Update frequency Every 5 minutes ~1.5 hours (estimated)
Composer v2 metadata-url
Composer v2 metadata-changes-url

Composer resolve times

Cold resolve (no cache) — lower is better:

Plugins WP Packages WPackagist Speedup
10 plugins 0.7s 12.3s 17x faster
20 plugins 1.1s 19.0s 17x faster

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"
    }
  ],
  "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"
    }
  ],
  "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