Provides a method of setting up Wordpress virtual hosts that share a single wordpress codebase, with options for individually configured plugins and themes.
{
"wordpress_opsworks":{
"cache_dir":"/var/cache/wordpress_opsworks",
"content_dir":"/srv/www/wp_content/current",
"user_dir":"/mnt/user",
"mysql":{
"host":"shared-db.aws.com",
"username":"root",
"password":"...",
"schema_file":"schema.tar.bz2"
},
"vhosts":{
"domainone.com":{
"admin_username":"admin",
"admin_password":"pass123",
"editor_username":"editor",
"editor_password":"321ssap"
"themes":["theme1","theme2"],
"plugins":["plugin1","plugin2"],
"debug":"true",
"siteurl":"http://domainone.com/wordpress/",
"home":"http://domainone.com/",
"blogname":"Name of the Blog",
"blogdescription":"Description of the Blog",
"users_can_register":"1",
"admin_email":"admin@domainone.com",
"aliases":["sub1.domainone.com","sub2.domainone.com"]
},
"domaintwo.com":{ ... },
"domainthree.com":{ ... }
},
"s3":{
"bucket":"mybucket",
"id":"your aws access key id",
"key":"your aws secret key"
}
}
}
Add these recipes to your layer's custom lifecycle events:
- Setup:
wordpress-opsworks
wordpress-opsworks::setup_wordpress
- Deploy:
wordpress-opsworks::setup_vhosts
node[:wordpress_opsworks][:vhosts]
Key | Description | Required |
---|---|---|
vhost[:admin_username] |
Administrator username used for initial setup (default: admin) | recommended |
vhost[:admin_password] |
Administrator password used for initial setup (default: admin) | recommended |
vhost[:editor_username] |
Editor username used for initial setup (default: editor) | recommended |
vhost[:editor_password] |
Editor password used for initial setup (default: editor) | recommended |
vhost[:themes] |
array of themes to link to the vhost | optional |
vhost[:plugins] |
array of plugins to link to the vhost | optional |
vhost[:siteurl] |
Site url of blog, used for internal links (default: http://domainname.com/wordpress/) | optional |
vhost[:home] |
Home url of blog, (default: http://domainname.com/) | optional |
vhost[:blogname] |
Initial blog name | optional |
vhost[:blogdescription] |
Initial description | optional |
vhost[:users_can_register] |
Allow user registration (0|1) | optional |
vhost[:admin_email] |
Administrator contact email | optional |
vhost[:aliases] |
array of alias domains | optional |
vhost[:debug] |
Enable wordpress debug mode | optional |
- create database on provision
- import skeleton schema / data
- modify siteurl & home settings
- set default admin user / pass
- set up plugins & themes
- set up random encryption salts once