Warning
This repository is no longer maintained by our internal teams.
The template is provided as is and will not receive updates, bug fixes, or new features.
You are welcome to contribute on it or fork the repository and modify it for your own use.
To deploy this template on Upsun, you can use the command upsun project:convert
on this codebase to convert the existing .platform.app.yaml configuration file to the Upsun Flex format.
This template builds WordPress on Platform.sh 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.app.yaml,.platform/services.yaml, and.platform/routes.yamlfiles have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit. - A
.environmentfile has been included which sets Bedrock's configuration on Platform.sh. 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_ENVhas been set toproductionin.environment. If you would instead prefer to haveWP_ENVmatch the type of Platform.sh environment (i.e. development, staging), you can set change that line toexport WP_ENV="${PLATFORM_ENVIRONMENT_TYPE}".
This template has been configured for use with Lando. Lando is Platform.sh's recommended local development tool. It is capable of reading your Platform.sh configuration files and standing up an environment that is very similar to your Platform.sh project. Additionally, Lando can easily pull down databases and file mounts from your Platform.sh project.
To get started using Lando with your Platform.sh project check out the Quick Start or the official Lando Platform.sh documentation.