How do I use it?
- Add the repository to your
composer.json - Add the desired plugins and themes to your requirements using
wpackagist-pluginorwpackagist-themeas the vendor name. - Run
$ composer.phar update - Packages are installed to
wp-content/plugins/orwp-content/themes/(unless otherwise specified byinstaller-paths)
Example Usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
{
"name": "acme/brilliant-wordpress-site",
"description": "My brilliant WordPress site",
"repositories":[
{
"name": "wpackagist",
"type": "composer",
"url": "https://wpackagist.org",
"only": [
"wpackagist-plugin/*",
"wpackagist-theme/*"
]
}
],
"require": {
"aws/aws-sdk-php":"*",
"wpackagist-plugin/akismet":"dev-trunk",
"wpackagist-plugin/advanced-custom-fields":">=6.7.1",
"wpackagist-theme/frost":"*"
},
"autoload": {
"psr-0": {
"Acme": "src/"
}
},
"extra": {
"installer-paths": {
"wp-content/mu-plugins/{$name}/": [
"wpackagist-plugin/akismet"
],
"wp-content/plugins/{$name}/": [
"type:wordpress-plugin"
]
}
}
}
This example composer.json file adds the Wpackagist repository and includes the
latest version of Akismet (installed as a must-use plugin), at least version 6.7.1 of Advanced Custom Fields, and the latest Frost theme along with the Amazon Web Services SDK from the main Packagist repository.
Find out more about using Composer including custom install paths.
The old vendor prefix wpackagist is now removed in favour of
wpackagist-plugin.