diff --git a/README.markdown b/README.markdown
index 1f868cb..f33b6d3 100644
--- a/README.markdown
+++ b/README.markdown
@@ -63,7 +63,7 @@ This will set up one or more installations of Wordpress 3.8 on Debian and Redhat
WordPress Plugin Directory. Full path, no trailing slash. Default: WordPress Default
* `wp_additional_config`
- Specifies a template to include near the end of the wp-config.php file to add additional options. Default: ''
+ Specifies a template to include near the end of the wp-config.php file to add additional options. As PHP does not allow Defines to be redefined this can not be used to redefine values already defined. Default: ''
* `wp_config_content`
Specifies the entire content for wp-config.php. This causes many of the other parameters to be ignored and allows an entirely custom config to be passed. It is recommended to use `wp_additional_config` instead of this parameter when possible.
@@ -80,8 +80,14 @@ This will set up one or more installations of Wordpress 3.8 on Debian and Redhat
* `wp_multisite`
Specifies whether to enable the multisite feature. Requires `wp_site_domain` to also be passed. Default: `false`
+* `wp_subdomain_install`
+ Specifies the `SUBDOMAIN_INSTALL` value that will be used when configuring multisite. This states whether blogs created will be blogname.domain.com. Default: `false`
+
* `wp_site_domain`
- Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''
+ Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''
+
+* `wp_path_current_site`
+ Specifies the `PATH_CURRENT_SITE` value that will be used when configuring multisite. If all sites are to be under a url location that is not the toplevel / set this value /path/. wp-admin will then be at /path/wp-admin and additional blogs will be under /path/blogname. Default: '/'
* `wp_debug`
Specifies the `WP_DEBUG` value that will control debugging. This must be true if you use the next two debug extensions. Default: 'false'
diff --git a/manifests/app.pp b/manifests/app.pp
index b9f42cc..708decb 100644
--- a/manifests/app.pp
+++ b/manifests/app.pp
@@ -16,7 +16,9 @@
$wp_proxy_host,
$wp_proxy_port,
$wp_multisite,
+ $wp_subdomain_install,
$wp_site_domain,
+ $wp_path_current_site,
$wp_debug,
$wp_debug_log,
$wp_debug_display,
@@ -38,7 +40,9 @@
wp_proxy_host => $wp_proxy_host,
wp_proxy_port => $wp_proxy_port,
wp_multisite => $wp_multisite,
+ wp_subdomain_install => $wp_subdomain_install,
wp_site_domain => $wp_site_domain,
+ wp_path_current_site => $wp_path_current_site,
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
diff --git a/manifests/init.pp b/manifests/init.pp
index 4ba78c1..f97c6c8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -60,14 +60,20 @@
# Specifies a Hostname or IP of a proxy server for Wordpress to use to install updates, plugins, etc. Default: ''
#
# [*wp_proxy_port*]
-# Specifies the port to use with the proxy host. Default: ''
+# Specifies the port to use with the proxy host. Default: ''
#
# [*wp_multisite*]
# Specifies whether to enable the multisite feature. Requires `wp_site_domain` to also be passed. Default: `false`
#
+# [*wp_subdomain_install*]
+# Specifies the `SUBDOMAIN_INSTALL` value that will be used when configuring multisite. This states whether blogs created will be blogname.domain
+#
# [*wp_site_domain*]
# Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''
#
+# [*wp_path_current_site*]
+# Specifies the `PATH_CURRENT_SITE` value that will be used when configuring multisite. If all sites are to be under a url location that is not t
+#
# [*wp_debug*]
# Specifies the `WP_DEBUG` value that will control debugging. This must be true if you use the next two debug extensions. Default: 'false'
#
@@ -101,7 +107,9 @@
$wp_proxy_host = '',
$wp_proxy_port = '',
$wp_multisite = false,
+ $wp_subdomain_install = false,
$wp_site_domain = '',
+ $wp_path_current_site = '/',
$wp_debug = false,
$wp_debug_log = false,
$wp_debug_display = false,
@@ -126,7 +134,9 @@
wp_proxy_host => $wp_proxy_host,
wp_proxy_port => $wp_proxy_port,
wp_multisite => $wp_multisite,
+ wp_subdomain_install => $wp_subdomain_install,
wp_site_domain => $wp_site_domain,
+ wp_path_current_site => $wp_path_current_site,
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
diff --git a/manifests/instance.pp b/manifests/instance.pp
index bd4c0a8..6c5c658 100644
--- a/manifests/instance.pp
+++ b/manifests/instance.pp
@@ -63,9 +63,15 @@
# [*wp_multisite*]
# Specifies whether to enable the multisite feature. Requires `wp_site_domain` to also be passed. Default: `false`
#
+# [*wp_subdomain_install*]
+# Specifies the `SUBDOMAIN_INSTALL` value that will be used when configuring multisite. This states whether blogs created will be blogname.domain
+#
# [*wp_site_domain*]
# Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''
#
+# [*wp_path_current_site*]
+# Specifies the `PATH_CURRENT_SITE` value that will be used when configuring multisite. If all sites are to be under a url location that is not t
+#
# === Requires
#
# === Examples
@@ -90,7 +96,9 @@
$wp_proxy_host = '',
$wp_proxy_port = '',
$wp_multisite = false,
+ $wp_subdomain_install = false,
$wp_site_domain = '',
+ $wp_path_current_site = '/',
$wp_debug = false,
$wp_debug_log = false,
$wp_debug_display = false,
@@ -113,7 +121,9 @@
wp_proxy_host => $wp_proxy_host,
wp_proxy_port => $wp_proxy_port,
wp_multisite => $wp_multisite,
+ wp_subdomain_install => $wp_subdomain_install,
wp_site_domain => $wp_site_domain,
+ wp_path_current_site => $wp_path_current_site,
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
diff --git a/manifests/instance/app.pp b/manifests/instance/app.pp
index 0f4379a..6601e06 100644
--- a/manifests/instance/app.pp
+++ b/manifests/instance/app.pp
@@ -16,13 +16,15 @@
$wp_proxy_host,
$wp_proxy_port,
$wp_multisite,
+ $wp_subdomain_install,
$wp_site_domain,
+ $wp_path_current_site,
$wp_debug,
$wp_debug_log,
$wp_debug_display,
) {
- validate_string($install_dir,$install_url,$version,$db_name,$db_host,$db_user,$db_password,$wp_owner,$wp_group, $wp_lang, $wp_plugin_dir,$wp_additional_config,$wp_table_prefix,$wp_proxy_host,$wp_proxy_port,$wp_site_domain)
- validate_bool($wp_multisite, $wp_debug, $wp_debug_log, $wp_debug_display)
+ validate_string($install_dir,$install_url,$version,$db_name,$db_host,$db_user,$db_password,$wp_owner,$wp_group, $wp_lang, $wp_plugin_dir,$wp_additional_config,$wp_table_prefix,$wp_proxy_host,$wp_proxy_port,$wp_site_domain,$wp_path_current_site)
+ validate_bool($wp_multisite, $wp_subdomain_install, $wp_debug, $wp_debug_log, $wp_debug_display)
validate_absolute_path($install_dir)
if $wp_config_content and ($wp_lang or $wp_debug or $wp_debug_log or $wp_debug_display or $wp_proxy_host or $wp_proxy_port or $wp_multisite or $wp_site_domain) {
@@ -45,7 +47,7 @@
File {
owner => $wp_owner,
group => $wp_group,
- mode => '0644',
+ mode => '0664',
}
Exec {
path => ['/bin','/sbin','/usr/bin','/usr/sbin'],
@@ -130,7 +132,9 @@
# - $wp_proxy_host
# - $wp_proxy_port
# - $wp_multisite
+ # - $wp_subdomain_install
# - $wp_site_domain
+ # - $wp_path_current_site
# - $wp_additional_config
# - $wp_debug
# - $wp_debug_log
diff --git a/templates/wp-config.php.erb b/templates/wp-config.php.erb
index 25d6a53..95b7411 100644
--- a/templates/wp-config.php.erb
+++ b/templates/wp-config.php.erb
@@ -89,9 +89,9 @@ define('WP_PROXY_PORT', '<%= @wp_proxy_port %>');
/* Multisite */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
-define('SUBDOMAIN_INSTALL', true);
+define('SUBDOMAIN_INSTALL', <%= @wp_subdomain_install %>);
define('DOMAIN_CURRENT_SITE', '<%= @wp_site_domain %>');
-define('PATH_CURRENT_SITE', '/');
+define('PATH_CURRENT_SITE', '<%= @wp_path_current_site %>');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
<% end %>