New Supermarket Announcements!

Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the supermarket mailing list.

Select Supported Platforms


wordpress (25) Versions 3.0.0

Installs/Configures WordPress

cookbook 'wordpress', '~> 3.0.0'
cookbook 'wordpress', '~> 3.0.0'
knife cookbook site install wordpress
knife cookbook site download wordpress

Build Status Dependency Status


The Chef WordPress cookbook installs and configures WordPress according to the instructions at


This cookbook does not set up the WordPress blog. You will need to do this manually by going to http://hostname/wp-admin/install.php (this URL may be different if you change the attribute values).



  • Ubuntu 12.04, 14.04
  • RHEL/CentOS 5, 6
  • Windows


  • mysql
  • mysql_chef_gem
  • php
  • apache2
  • iis
  • windows
  • openssl (uses library to generate secure passwords)
  • selinux (used to disable selinux for MySQL on RHEL-based systems)



  • node['wordpress']['version'] - Version of WordPress to download. Use 'latest' to download most recent version.
  • node['wordpress']['parent_dir'] - Parent directory to where WordPress will be extracted. (Windows Only)
  • node['wordpress']['dir'] - Location to place WordPress files.
  • node['wordpress']['db']['root_password'] - Root password for MySQL (added for support with community cookbook version 6+)
  • node['wordpress']['db']['instance_name'] - Name of the MySQL instance to use with MySQL (community cookbook version 6+)
  • node['wordpress']['db']['name'] - Name of the WordPress MySQL database.
  • node['wordpress']['db']['user'] - Name of the WordPress MySQL user.
  • node['wordpress']['db']['pass'] - Password of the WordPress MySQL user. By default, generated using openssl cookbook.
  • node['wordpress']['db']['prefix'] - Prefix of all MySQL tables created by WordPress.
  • node['wordpress']['db']['host'] - Host of the WordPress MySQL database.
  • node['wordpress']['db']['port'] - Port of the WordPress MySQL database.
  • node['wordpress']['db']['charset'] - Character set of the WordPress MySQL database tables. Defaults to 'utf8'.
  • node['wordpress']['db']['collate'] - Collation of the WordPress MySQL database tables.
  • node['wordpress']['db']['mysql_version'] - Version of MySQL to install (for supporting community cookbook version 6+)

  • node['wordpress']['allow_multisite'] - Enable multisite features (default: false).

  • node['wordpress']['wp_config_options'] - A hash of options to define in wp_config.php, output as key value pairs into a PHP constant e.g. define( '<%= @key %>', <%= @value %> );. Note: for values you will need to add single quotes around text but omit them for booleans and numbers. (default: {}).

  • node['wordpress']['config_perms'] - Permissions to set for a site's wp-config.php.

  • node['wordpress']['server_aliases'] - Aliases to use when setting up Virtual Host with Nginx or Apache

  • node['wordpress']['server_port'] - Port to use when setting up the Virtual Host with Nginx or Apache

  • node['wordpress']['install']['user'] - Install user used for WordPress file permissions and the PHP-FPM user (if applicable)

  • node['wordpress']['install']['group'] - Install group used for WordPress file permissions and the PHP-FPM group (if necessary)

  • node['wordpress']['parent_dir'] - Parent directory of where WordPress will be installed. This is used in the Windows installation to determine where the .zip will be downloaded to.

  • node['wordpress']['dir'] - Path where WordPress should be installed

  • node['wordpress']['url'] - URL to the zip or tarball installer of WordPress

  • node['wordpress']['server_name'] - Hostname used for setting up the Virtual Host configuration for your WordPress site

  • node['wordpress']['php_options'] - Additional PHP settings for the installation.


Add the "wordpress" recipe to your node's run list or role, or include the recipe in another cookbook.

License and Author

Copyright:: 2010-2013, Chef Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


v3.0.0 (2015-02-24)

  • Cookbook updated to support the MySQL 6.0 community cookbook
  • Added selinux as a dependency to resolve MySQL installation issues on CentOS
  • Adjustments made to Nginx/PHP-FPM configuration to work out of the box with CentOS
  • Added attribute to allow for additional WordPress configuration options
  • Updated bats tests to work when testing WordPress version 4+ and <4
  • Removed testing for Ubuntu 10.04 due to fast approaching EOL and bugs in several cookbooks WordPress depends on.

v2.1.5 (2014-06-28)

  • Recipe added to support installation with nginx

v2.1.2 (2014-04-03)

  • Fixes issue where mysql::ruby recipe was removed in v5 of community cookbook

v2.1.0 (2014-02-27)

[COOK-4354] s/Wordpress/WordPress/g in docs [COOK-4356] Gets WordPress to be extracted to the proper directory [COOK-4191] WordPress table_prefix not configured when node['wordpress']['db']['prefix'] is set [COOK-4192] Add attribute to control WordPress multisite features [COOK-4366] apache2 port parameter

v2.0.0 (2014-02-27)

[COOK-4180] leverage the database cookbook

v1.3.2 (2014-01-23)

  • [COOK-4248] - use "no_managed_code" when setting up WordPress Pool on Windows
  • [COOK-4170] - Wordpress tarball contains a wordpress subdirectory, causing "extract-wordpress" to execute every run and the WP URL to be http://hostname/wordpress/




New Feature


  • COOK-3311 - Remove legacy Test Kitchen, Add Travis CI


  • Added Test Kitchen 1.0

Bug Fixes: - [COOK-1393]: wordpress recipe should use mysql::ruby to ensure ruby extension is installed - [COOK-2984]: wordpress cookbook has foodcritic failures

Improvements: - [COOK-2661]: Allow downloads from other repos for wordpress install


  • [COOK-1127] - update defaults to latest version
  • [COOK-1222] - support installing "latest" version
  • [COOK-1271] - Wordpress cookbook generates new password on every chef run


  • [COOK-826] - recipe doesn't quote password string


  • [COOK-534] - allow server_aliases to overridden by an attribute
  • [COOK-799] - fixed disables .htaccess breaking permalink feature
  • [COOK-820] - guard with check for chef-solo in our cookbooks


  • [COOK-406] - wp-config.php.erb has wrong CRLF encoding
  • Dropping explicit support for Red Hat platforms due to issues in php and mysql cookbooks (COOK-603, COOK-672, COOK-816, COOK-679)


  • [COOK-435] Don't set the mysql root user password in wordpress cookbook
  • [COOK-535] - recursively create the directory
  • RHEL/CentOS/Fedora support (yeah!)
  • cleaned up node attribute keys
  • cleaned up
FC023: Prefer conditional attributes: /tmp/cook/7e12c6f7000f5ccbff77384a/wordpress/recipes/database.rb:23
FC023: Prefer conditional attributes: /tmp/cook/7e12c6f7000f5ccbff77384a/wordpress/recipes/nginx.rb:58
FC024: Consider adding platform equivalents: /tmp/cook/7e12c6f7000f5ccbff77384a/wordpress/attributes/default.rb:46
FC031: Cookbook without metadata file: /tmp/cook/7e12c6f7000f5ccbff77384a/wordpress/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/7e12c6f7000f5ccbff77384a/wordpress/metadata.rb:1