Skip to content

Instantly share code, notes, and snippets.

@jesgs
Created July 29, 2020 15:50
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 jesgs/09be9ad0aa423f04a1212a3f2873d106 to your computer and use it in GitHub Desktop.
Save jesgs/09be9ad0aa423f04a1212a3f2873d106 to your computer and use it in GitHub Desktop.
Composer install scripts for WordPress and Homestead
{
"name": "jesgs/wordpress-project",
"type": "project",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"require": {
"laravel/homestead": "^10.10",
"composer/installers": ">=1.7",
"wpackagist-plugin/debug-bar": "1.0.1",
"wpackagist-plugin/debug-bar-actions-and-filters-addon": "1.5.4",
"wpackagist-plugin/which-template":"4.1",
"symfony/var-dumper": "^5.1"
},
"scripts" : {
"pre-update-cmd" : [
"sh ./pre-install-cmd.sh"
],
"post-update-cmd" : [
"sh ./post-install-cmd.sh"
]
},
"extra": {
"installer-paths": {
"wp-content/mu-plugins/{$name}/": [
"type:wordpress-muplugin"
],
"wp-content/plugins/{$name}/": [
"type:wordpress-plugin"
],
"wp-content/themes/{$name}/": [
"type:wordpress-theme"
]
}
},
"authors": [
{
"name": "jesgs",
"email": "2304490+jesgs@users.noreply.github.com"
}
]
}
#!/bin/bash
if [ ! -f "wp-config.php" ]; then
echo "Create Homestead environment..."
./vendor/bin/homestead make
fi
#!/bin/bash
if [ ! -f "wp-config-sample.php" ]; then
wp core download
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment