Skip to content

Instantly share code, notes, and snippets.

@rosswintle
Last active July 7, 2022 15:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosswintle/26dc5a81c83378062a937b49b4d0e58e to your computer and use it in GitHub Desktop.
Save rosswintle/26dc5a81c83378062a937b49b4d0e58e to your computer and use it in GitHub Desktop.
WordPress using Composer: composer.json template
{
"name": "your_organisation_or_name/your_project_name",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": [
"wpackagist-plugin/*",
"wpackagist-theme/*"
]
}
],
"authors": [
{
"name": "Your name",
"email": "your_email@test.com"
}
],
"require": {
"johnpbloch/wordpress": "^6.0"
},
"config": {
"allow-plugins": {
"johnpbloch/wordpress-core-installer": true,
"composer/installers": true
}
},
"extra": {
"wordpress-install-dir": "",
"installer-paths": {
"wordpress/wp-content/mu-plugins/{$name}/": [
"type:wordpress-muplugin"
],
"wordpress/wp-content/plugins/{$name}/": [
"type:wordpress-plugin"
],
"wordpress/wp-content/themes/{$name}/": [
"type:wordpress-theme"
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment