WP Composer is now WP Packages! Read the announcement.

WordPress Core via Composer

Packages for installing WordPress core via Composer. Choose the build that fits your project.

17.0M total installs via Packagist

roots/wordpress is a meta-package that provides WordPress core installation via Composer. It's part of the Roots WordPress packaging ecosystem, which includes several packages to give you flexibility in how WordPress is installed.

Packages

Package Description Includes
roots/wordpress Meta-package (recommended) Installs roots/wordpress-no-content
roots/wordpress-full Full WordPress build Core, official themes, Akismet & Hello Dolly, beta & RC releases
roots/wordpress-no-content Minimal WordPress build Core only — no themes, plugins, or beta releases
roots/wordpress-core-installer Composer plugin Installs WordPress core outside of vendor/ into a configurable directory

How packages are built

Packages are generated by roots/wordpress-packager, an open-source PHP tool that polls the WordPress.org API every 10 minutes for new releases.

Release detection

New WordPress versions are compared against existing package tags before publishing

Dist integrity

Packages reference official wordpress.org dist zips with SHA1 checksum verification

Tested pipeline

Packager has a PHPUnit test suite, PHPStan at max level, and CI on every change

Core installer

roots/wordpress-core-installer is a Composer plugin that installs WordPress core into a dedicated directory (default: wordpress/) instead of vendor/. This is required for WordPress to function properly, since it expects to run from its own directory.

The install directory can be customized in your composer.json:

composer.json
{
  "extra": {
    "wordpress-install-dir": "wp"
  }
}

Getting started

Most projects should use roots/wordpress, which installs WordPress core without default themes or plugins. This is the recommended package for Bedrock projects and modern WordPress development.

$ composer require roots/wordpress

Example configurations

Standard (recommended)

WordPress core without default themes or plugins. Manage your themes and plugins individually via Composer with WP Packages.

composer.json
{
  "repositories": [
    {
      "name": "wp-packages",
      "type": "composer",
      "url": "https://repo.wp-packages.org"
    }
  ],
  "require": {
    "composer/installers": "^2.2",
    "roots/wordpress": "^6.8",
    "wp-plugin/woocommerce": "^10.0",
    "wp-theme/twentytwentyfive": "^1.0"
  },
  "config": {
    "allow-plugins": {
      "composer/installers": true,
      "roots/wordpress-core-installer": true
    }
  }
}

Full build

Includes default themes, Akismet, Hello Dolly, and beta/RC releases. Closest to a standard WordPress download.

composer.json
{
  "require": {
    "roots/wordpress-core-installer": "^3.0",
    "roots/wordpress-full": "^6.8"
  },
  "config": {
    "allow-plugins": {
      "roots/wordpress-core-installer": true
    }
  }
}

Using Bedrock?

All of this is already configured for you. Bedrock is a WordPress boilerplate with Composer, better configuration, and an improved folder structure.

Learn more about Bedrock

WP Packages is community-funded open source. Support our work by sponsoring us on GitHub.

Sponsors

Carrot WordPress.com Itineris Kinsta

Request SVN tagging

Copy the message below and post it on the plugin's WordPress.org support forum:

Open support forum