Skip to content
Snippets Groups Projects
Select Git revision
  • master
1 result

wordpress

  • Clone with SSH
  • Clone with HTTPS
  • Name Last commit Last update
    files
    manifests
    README
    wordpress puppet module
    -----------------------
    
    Automatically setup the proper permissions for a wordpress site, and
    ensure that the right user is owning the files. Its also possible to
    distribute customized .htaccess files, or allow wordpress to manage
    them.
    
    An example usage, the following will set a specified htaccess file:
    
      wordpress::site {
        "crabgrass_project":
          htaccess => 'custom',
          source => "$fileserver/wordpress/htaccess_crabgrass";
      }
    
    The following is the simpliest usage, and will use the defaults described below:
      wordpress::site { [ "site1", "site2", "site3" ]: }	
    
    .htaccess file
    --------------
    The .htaccess file is managed as follows, in all cases puppet manages the permissions on the file
    by default, the file is set so the webserver has write access to the file, so that if the wordpress
    admin attempts to write to the file via the admin interface, they will be able to.
    If the .htaccess file is set to anything via puppet, then the webserver does not have write permissons
    to the file, so that any admin interface changes to .htaccess will be denied by permissions because if
    a change was made via the admin interface, then it would be overwritten by puppet on the next run. 
    
    if $htaccess is not set, and neither is $source or $content, wordpress manages it
    if $htaccess is set to 'wp-config', then, then a basic .htaccess is installed, protecting wp-config.php
    if $htaccess is set to anything else, and either $source or $content is specified then the specified
    version is installed
    
    themes
    ------
    You have two options with Wordpress themes, either you want the built-in theme editor to work, or you
    do not want to use the built-in theme editor. Every site I've used, someone designed the CSS and put it
    in place, and the built-in theme editor was not touched by the people managing the blog, the one time it
    was enabled, the person managing the blog accidentally messed up the theme, so the default is to set it
    so the built-in theme editor does not work. If you want it to work, set theme => something;
    
    users
    -----
    By default the 'wordpress' user will be created for you, and used for the ownership of all wordpress sites.
    To override this and specify the user you wish to be the owner, do as follows:
    
    wordpress::site { "blah": owner => "foo" }
     
    You can also remove the sites and users by specifying ensure => absent:
    
    wordpress::site { [ "blah", "foo" ]: owner => 'blah', ensure => absent; }
    
    Note: the following is not possible because you can't use inside variables in the calling context
     wordpress::site { [ "blah", "foo" ]: owner => "${name}_whatever"; }