Skip to content

Instantly share code, notes, and snippets.

@guillaumemolter
Created August 5, 2019 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaumemolter/3a500dbe85a9f391c79bb859f0d8aaca to your computer and use it in GitHub Desktop.
Save guillaumemolter/3a500dbe85a9f391c79bb859f0d8aaca to your computer and use it in GitHub Desktop.
WordPress management Composer workflow
{
"name": "",
"description": "",
"type": "project",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"require": {
"johnpbloch/wordpress": "^5.2"
},
"require-dev": {
},
"extra": {
"wordpress-install-dir": "build/",
"installer-paths": {
"vendor/wp-plugins/{$name}/": [
"type:wordpress-plugin"
],
"vendor/wp-themes/{$name}/": [
"type:wordpress-theme"
]
}
},
"scripts": {
"post-install-cmd": [
"mv vendor/wp-themes/* build/wp-content/themes/",
"mv vendor/wp-plugins/* build/wp-content/plugins/"
],
"post-update-cmd": [
"mv vendor/wp-themes/* build/wp-content/themes/",
"mv vendor/wp-plugins/* build/wp-content/plugins/",
"mv wp-config.php build/wp-config.php"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment