Streamline WordPress on with Bedrock & Composer

This template builds WordPress on using the Bedrock boilerplate by Roots with Composer. Plugins and themes should be managed with Composer exclusively. The only modifications made to the standard Bedrock boilerplate have been providing database credentials and main site url parameters via environment variables. With this configuration, the database is automatically configured such that the installer will not ask you for database credentials. While Bedrock provides support to replicate this configuration in a .env file for local development, an example Lando configuration file is included as the recommendated method to do so.

WordPress is a blogging and lightweight CMS written in PHP, and Bedrock is a Composer-based WordPress boilerplate project with a slightly modified project structure and configuration protocol.


  • PHP 8.1
  • MariaDB 10.4
  • Automatic TLS certificates
  • Composer-based build


Run through the WordPress installer as normal. You will not be asked for database credentials as those are already provided.


The following changes have been made relative to Bedrock's project creation command composer create-project roots/bedrock. If using this project as a reference for your own existing project, replicate the changes below to your project.

  • The, .platform/services.yaml, and .platform/routes.yaml files have been added. These provide configuration and are present in all projects on You may customize them as you see fit.
  • A .environment file has been included which sets Bedrock's configuration on It defines the connection to the MariaDB database, the primary site URL, and security keys and salts.
  • A base Landofile provides configuration to use this template locally using Lando.
  • In order to preserve 1-to-1 clones of development environments, WP_ENV has been set to production in .environment. If you would instead prefer to have WP_ENV match the type of environment (i.e. development, staging), you can set change that line to export WP_ENV="${PLATFORM_ENVIRONMENT_TYPE}".

Local development

This template has been configured for use with Lando. Lando is's recommended local development tool. It is capable of reading your configuration files and standing up an environment that is very similar to your project. Additionally, Lando can easily pull down databases and file mounts from your project.

To get started using Lando with your project check out the Quick Start or the official Lando documentation.


  • Bedrock at Roots
  • Bedrock documentation
  • Bedrock on GitHub
  • WordPress
  • WordPress on
  • PHP on
  • How to install Wordpress plugins and themes with Composer
  • How to install custom/private Wordpress plugins and themes with Composer

Download Details:

Author: platformsh-templates

Official Github:  

License: MIT


Streamline WordPress on with Bedrock & Composer
1.45 GEEK