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

1 KiB
Raw Permalink Blame History

Rewrite

Description

Lists or flushes the sites rewrite rules, updates the permalink structure.

Attributes

    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

  wp::rewrite { 'Year, Month, Name':
    location  => '/vagrant',
    structure => '/%year%/%monthnum%/%postname%/', 
  }