Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Here's the composer file used in my demo during my talk at WordCamp Norrkoping
{
"name": "edmund.turbin/wordpress-starter",
"description": "This is a basic wordpress install with some changes to the wp-content and core file locations",
"type": "dev",
"license": "GPL",
"authors": [
{
"name": "Edmund Turbin",
"email": "edmund.turbin@wpengine.com"
}
],
"repositories":[
{
"type": "composer",
"url": "http://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "roots/sage",
"type": "wordpress-theme",
"version": "dev-master",
"source": {
"url":"https://github.com/roots/sage.git",
"type": "git",
"reference": "master"
}
}
}
],
"minimum-stability": "dev",
"require": {
"composer/installers": "~1.0",
"wpackagist-plugin/debug-bar":"*",
"wpackagist-plugin/debug-objects":"*",
"johnpbloch/wordpress": "*",
"roots/sage": "*"
},
"extra": {
"wordpress-install-dir": "wp",
"installer-paths": {
"content/plugins/{$name}": ["type:wordpress-plugin"],
"content/themes/{$name}": ["type:wordpress-theme"],
"content/mu-plugins/{$name}": ["type:wordpress-muplugin"]
}
},
"scripts": {
"post-install-cmd": [
"cp wp/index.php ./index.php",
"cp wp/wp-config-sample.php wp/wp-config.php",
"sed -i '' \"s/\\/wp-blog-header/\\/wp\\/wp-blog-header/g\" index.php",
"sed -i '' '2i\\'$'\\n''/** Define variables for custom content directory */'$'\\n' wp/wp-config.php",
"sed -i '' '3i\\'$'\\n''define ('WP_CONTENT_FOLDERNAME', 'content');'$'\\n' wp/wp-config.php",
"sed -i '' '4i\\'$'\\n''define ('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);'$'\\n' wp/wp-config.php"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment