hunner/puppet-wordpress

Issues Uploading Files?

Opened this issue · 1 comments

Hi All,

I've been using Puppet for a little while now and came across this which (I believe) seems to be related to this module. Maybe it's just the way I've set things up, so perhaps someone can point out some areas for improvement. I've put together a quick little class that looks like the following:
class my_wp {
package { 'php':
ensure => latest,
}
class { 'wordpress':
install_dir => '/var/www/html/wordpress',
require => [ Package['php'], Class['::mysql::server'] ],
}

include mysql::server
class { '::mysql::bindings':
php_enable => true,
}

class { 'apache':
mpm_module => 'prefork',
}
include apache::mod::php
apache::vhost { 'localhost':
port => '80',
docroot => '/var/www/html/wordpress',
}
}

Now, the instance seems to come up just fine. I'm able to create the administrator account, etc. I'm even able to post. HOWEVER, when I get to the part where I need to add a picture or attachment, i get the following error:
screen shot 2014-12-18 at 20 36 03

I get that it may be due to the default root user installation method, but should this be resolved in this module? Or am I doing something wrong?

The apache module uses apache / www-data / www user (depends on the OS) to run apache by default.

The wordpress module uses root to install wordpress by default.

Try to pass wp_owner / wp_group params to wordpress module so the user is the same in both, i.e.:

class { 'wordpress':
  install_dir => '/var/www/html/wordpress',
  require => [ Package['php'], Class['::mysql::server'] ],
  wp_owner => 'apache',
  wp_group => 'apache',
}