puppet-wp/docs/classes/rewrite.md
2019-09-03 18:13:20 +10:00

43 lines
1 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.

# Rewrite
* [Description](/classes/rewrite.html#description)
* [Attributes](/classes/rewrite.html#attributes)
## Description
Lists or flushes the sites rewrite rules, updates the permalink structure.
## Attributes
```puppet
wp::rewrite { 'resource title':
location => # The location to run the command.
structure => # The rewrite structure.
user => # The user to run the command as.
}
```
### location
The directory from which to run the command. If this directory does not exist, the command will fail.
### structure
(*If omitted, this attributes value defaults to the resources title.*)
Values: Any allowed WordPress permalink structure. e.g. `/%post_id%/%postname%/`, `/%year%/%monthnum%/%postname%/`, `/blog/%postname%/`.
### user
(*If omitted, this attributes value defaults to `www-data`.*)
The user to use to run the command.
### Examples
```puppet
wp::rewrite { 'Year, Month, Name':
location => '/vagrant',
structure => '/%year%/%monthnum%/%postname%/',
}
```