Skip to content

Instantly share code, notes, and snippets.

@rosswintle
Last active Jul 7, 2022
Embed
What would you like to do?
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