puppet-wp/docs/classes/site.md
2019-09-01 21:59:57 +10:00

122 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Site
* [Description](/classes/site.html#description)
* [Attributes](/classes/site.html#attributes)
## Description
Installs WordPress using WP-CLI.
## Attributes
```puppet
wp::site { 'resource title':
url => # The URL of the WordPress site.
location => # The location to run the command.
siteurl => # The URL of the WordPress site.
sitename => # The name of the site.
admin_user => # The site administrators username.
admin_email => # The site administrators email address.
admin_password => # The site administrators password.
network => # If the site is a multisite.
subdomains => # Whether the multisite installation is in subfolders or subdomains.
user => # The user to run the installation as.
}
```
### url
The URL of the site. e.g. `http://vagrant.local/`.
### location
The location to run the command. e.g. `/vagrant`.
### siteurl
The URL of the site including the protocol. e.g. `http://vagrant.local/`.
### sitename
(*If omitted, this attributes value defaults to `WordPress Site`.*)
The name of your site. e.g. `My Amazing Site`
### admin_user
(*If omitted, this attributes value defaults to `admin`.*)
The site administrator user name. e.g. `bronson`
### admin_email
(*If omitted, this attributes value defaults to `admin@example.com`.*)
The site administrators email address.
### admin_password
(*If omitted, this attributes value defaults to `password`.*)
The site administrators password: e.g. `aLbRY!Q9Qfh7YZ.h9jd!`
### network
(*If omitted, this attributes value defaults to `false`.*)
Whether or note the site is a multisite.
Values: `true`, `false`.
### subdomains
(*If omitted, this attributes value defaults to `false`.*)
Whether or not the multiste is setup as a subdomain. If this is set to `false` then WordPress multisite will be setup for subfolders.
Values: `true`, `false`.
### user
(*If omitted, this attributes value defaults to `www-data`.*)
The user to use to run the command.
#### Examples
Setup a normal WordPress installation.
```puppet
wp::site { 'Setup a WordPress Site':
url => "http://vagrant.local/",
location => '/vagrant'
sitename => 'My Amazing Site',
admin_user => 'bronson',
admin_email => 'bronson@here.com',
admin_password => 'aLbRY!Q9Qfh7YZ.h9jd!',
}
```
Setup a WordPress multisite installation in subfolders.
```puppet
wp::site { 'Setup a WordPress Site':
url => "http://vagrant.local/",
location => '/vagrant'
sitename => 'My Amazing Site',
admin_user => 'bronson',
admin_email => 'bronson@here.com',
admin_password => 'aLbRY!Q9Qfh7YZ.h9jd!',
network => true,
}
```
Setup a WordPress multisite installation with subdomains.
```puppet
wp::site { 'Setup a WordPress Site':
url => "http://vagrant.local/",
location => '/vagrant'
sitename => 'My Amazing Site',
admin_user => 'bronson',
admin_email => 'bronson@here.com',
admin_password => 'aLbRY!Q9Qfh7YZ.h9jd!',
network => true,
subdomains => true,
}
```