Wordpress

Deploy a highly scalable, self-healing Wordpress cluster in seconds.

About

Wordpress is the world's most popular open-source content management system (CMS).

Stack

This template provisions the following components:

ComponentProcess typeHorizontally scalable
NGINXWebYes
PHP-FPM (7.4+)WorkerYes
MariaDB (10.3+)Service-
Redis Cache*Service-
Elasticsearch*Service-
Varnish*Service-

* Optional addon

Supported versions

Installs the latest stable version of Wordpress.

Alternatively, choose "Skip installation" to bring your own codebase.

Deployment

Package dependencies are automatically installed with composer during the build step if either of the files composer.json or composer.lock exists.

Configuration

This template automatically manages the wp-config.php config file.

  • Database credentials are automatically populated based on the environment.
  • Redis, Varnish and Elasticsearch can be configured (manually) if the addons are enabled

Environment variables

The Wordpress configuration can be customized with the following variables.

Variable nameDescription
WP_SITE_URLChanges the Wordpress Site URL (default site url)
WP_HOMEChanges the Wordpress base URL (default site url)
WP_DEBUGToggles debug mode on/off (true|false, default: false)
WP_DEBUG_DISPLAYIncludes debug messages in page HTML (true|false, default: false)
WP_DEBUG_LOGSaves debug messages to a file (true|false or filename, default: false)
WP_TABLE_PREFIXSets custom database table prefix (default: wp_)
WP_CRON_DISABLEDisable built-in WP-Cron (true|false, default: false)
WP_CRON_LOCK_TIMEOUT Changes the WP-Cron interval (time in seconds, default: 60)
WP_ALLOW_MULTISITE Enables Wordpress Multisite (MU) feature
WP_CACHEEnables use of 3. party caching plugins (true|false, default: false)

Cron jobs

This template does not automatically configure any cron jobs as Wordpress includes a default cron scheduler (WP-Cron) which executes on every page load. You may, however, replace this with a dedicated cron job.

You can manage jobs from the Site Dashboard > Settings > Cron jobs section.

If you've created a dedicated cron job we strongly recommended that you disable the built-in WP-Cron by setting the environment variable WP_CRON_DISABLE=true.

Persistent disks

The following directories are mounted by persistent storage volumes.

./wp-content/uploads

Contains image uploads, themes and plugins

./wp-content/cache

Contains cached files

Do NOT commit these folders to your Git repository as they will be overwritten. Use SFTP to upload files.

Admin tools

The following utilities are included with this template.

  • WP-CLI (alias: wp) is a command-line interface for Wordpress.
  • phpMyAdmin is a web-based administration tool for your database.