Forge Home


Puppet module to set up multiple instances of wordpress


10,028 latest version

3.4 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.7.3 (latest)
released Feb 9th 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'mikegleasonjr-wordpress', '0.7.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mikegleasonjr-wordpress
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mikegleasonjr-wordpress --version 0.7.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Tags: wordpress, blog


mikegleasonjr/wordpress — version 0.7.3 Feb 9th 2014

WordPress Module


This will set up an installation of Wordpress 3.8 on Debian and Redhat style distributions.


Installation includes:

  • Configuration of WordPress DB connection parameters
  • Generate secure keys and salts for wp-config.php.
  • Optional creation of MySQL database/user/permissions.


  • Configuration of php-enabled webserver
  • Configuration MySQL server
  • PHP 5.3 or greater


  • install_dir Specifies the directory into which wordpress should be installed. Default: /opt/wordpress

  • install_url Specifies the url from which the wordpress tarball should be downloaded. Default:

  • version Specifies the version of wordpress to install. Default: 3.8

  • create_db Specifies whether to create the db or not. Default: true

  • create_db_user Specifies whether to create the db user or not. Default: true

  • db_name Specifies the database name which the wordpress module should be configured to use. Default: wordpress

  • db_host Specifies the database host to connect to. Default: localhost

  • db_user Specifies the database user. Default: wordpress

  • db_password Specifies the database user's password in plaintext. Default: password

  • wp_owner Specifies the owner of the wordpress files. Default: root

  • wp_group Specifies the group of the wordpress files. Default: 0 (*BSD/Darwin compatible GID)

  • wp_lang WordPress Localized Language. Default: ''

  • wp_plugin_dir WordPress Plugin Directory. Full path, no trailing slash. Default: WordPress Default

  • wp_additional_config Specifies a template to include near the end of the wp-config.php file to add additional options. Default: ''

  • wp_table_prefix Specifies the database table prefix. Default: wp_

  • wp_proxy_host Specifies a Hostname or IP of a proxy server for Wordpress to use to install updates, plugins, etc. Default: ''

  • wp_proxy_port Specifies the port to use with the proxy host. Default: ''

  • wp_multisite Specifies whether to enable the multisite feature. Requires wp_site_domain to also be passed. Default: false

  • wp_site_domain Specifies the DOMAIN_CURRENT_SITE value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''

Example Usage

Default deployment (insecure; default passwords and installed as root):

wordpress { 'wordpress': }

Basic deployment (secure database password, installed as wordpress user/group):

wordpress { 'wordpress':
  wp_owner    => 'wordpress',
  wp_group    => 'wordpress',
  db_user     => 'wordpress',
  db_password => 'hvyH(S%t(\"0\"16',

Externally hosted MySQL DB:

wordpress { 'wordpress':
  db_user     => 'wordpress',
  db_password => 'hvyH(S%t(\"0\"16',
  db_host     => '',

Disable module's database/user creation (the database and db user must still exist with correct permissions):

wordpress { 'wordpress':
  db_user        => 'wordpress',
  db_password    => 'hvyH(S%t(\"0\"16',
  create_db      => false,
  create_db_user => false,

Install specific version of WordPress:

wordpress { 'wordpress':
  version => '3.4',

Install WordPress to a specific directory:

wordpress { 'wordpress':
  install_dir => '/var/www/wordpress',

Download wordpress-${version}.tar.gz from an internal server:

wordpress { 'wordpress':
  install_url => '',

Configure wordpress to download updates and plugins through a proxy:

wordpress { 'wordpress':
  proxy_host => '',
  proxy_port => '8080',

Enable the multisite wordpress feature:

wordpress { 'wordpress':
  wp_multisite   => true,
  wp_site_domain => '',

Add custom configuration to wp-config.php:

wordpress { 'wordpress':
  wp_additional_config => 'foo/wp-config-extra.php.erb',