# docker-library/wordpress architecture

> Architecture diagram of the GitHub repository docker-library/wordpress, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/docker-library/wordpress
- Repository: https://github.com/docker-library/wordpress

## Overview

This repository maintains the Docker Official Image for WordPress, with image definitions organized by release channel, PHP version, and Apache or FPM runtime. The likely user workflow is to run a selected image with environment-based configuration and serve a WordPress site. The excerpts show environment-variable and *_FILE configuration handling, including database settings and table prefixes. Entrypoint behavior and the full startup sequence are not sampled, so their relationships are shown only as unverified.

Main entry points: [`latest`](https://github.com/docker-library/wordpress/tree/master/latest) (Release and runtime variants), [`wp-config-docker.php`](https://github.com/docker-library/wordpress/blob/master/wp-config-docker.php) (Environment configuration), [`docker-entrypoint.sh`](https://github.com/docker-library/wordpress/blob/master/docker-entrypoint.sh) (Shared startup), [`latest/php8.2/apache/docker-entrypoint.sh`](https://github.com/docker-library/wordpress/blob/master/latest/php8.2/apache/docker-entrypoint.sh) (Apache startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_images["WordPress Images"]
  node_image_matrix["Release and runtime variants"]
  node_latest_apache["Apache image definition<br/>[Dockerfile]"]
  node_latest_fpm["FPM image definition<br/>[Dockerfile]"]
  node_beta_images["Beta image variants"]
  node_cli_images["CLI image variants"]
end

subgraph group_startup["Container Startup"]
  node_apache_entry["Apache startup"]
  node_fpm_entry["FPM startup"]
  node_shared_entry["Shared startup"]
end

subgraph group_configuration["Site Configuration"]
  node_wp_config["Environment configuration"]
end

node_operator(("Image user"))
node_docker["Docker runtime"]
node_wordpress["WordPress site"]
node_database[("WordPress database")]
node_env["Container environment"]

node_operator -->|"runs image"| node_docker
node_docker -.->|"runs variant"| node_image_matrix
node_image_matrix -.->|"offers Apache"| node_latest_apache
node_image_matrix -.->|"offers FPM"| node_latest_fpm
node_image_matrix -.->|"offers beta"| node_beta_images
node_image_matrix -.->|"offers CLI"| node_cli_images
node_docker -.->|"starts container"| node_apache_entry
node_docker -.->|"starts container"| node_fpm_entry
node_apache_entry -.->|"delegates startup"| node_shared_entry
node_fpm_entry -.->|"delegates startup"| node_shared_entry
node_shared_entry -.->|"uses configuration"| node_wp_config
node_env -->|"provides settings"| node_wp_config
node_wp_config -.->|"configures site"| node_wordpress
node_wp_config -->|"sets connection settings"| node_database

click node_image_matrix "https://github.com/docker-library/wordpress/tree/master/latest"
click node_latest_apache "https://github.com/docker-library/wordpress/blob/master/latest/php8.2/apache/Dockerfile"
click node_latest_fpm "https://github.com/docker-library/wordpress/blob/master/latest/php8.2/fpm/Dockerfile"
click node_beta_images "https://github.com/docker-library/wordpress/tree/master/beta"
click node_cli_images "https://github.com/docker-library/wordpress/tree/master/cli"
click node_apache_entry "https://github.com/docker-library/wordpress/blob/master/latest/php8.2/apache/docker-entrypoint.sh"
click node_fpm_entry "https://github.com/docker-library/wordpress/blob/master/latest/php8.2/fpm/docker-entrypoint.sh"
click node_shared_entry "https://github.com/docker-library/wordpress/blob/master/docker-entrypoint.sh"
click node_wp_config "https://github.com/docker-library/wordpress/blob/master/wp-config-docker.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_image_matrix,node_latest_apache,node_latest_fpm,node_beta_images,node_cli_images,node_operator toneBlue
class node_apache_entry,node_fpm_entry,node_shared_entry,node_database toneAmber
class node_wp_config toneMint
class node_docker,node_wordpress,node_env toneIndigo
```

## Components

### WordPress Images

- [Release and runtime variants](https://github.com/docker-library/wordpress/tree/master/latest): `latest`
- [Apache image definition](https://github.com/docker-library/wordpress/blob/master/latest/php8.2/apache/Dockerfile): `latest/php8.2/apache/Dockerfile`
- [FPM image definition](https://github.com/docker-library/wordpress/blob/master/latest/php8.2/fpm/Dockerfile): `latest/php8.2/fpm/Dockerfile`
- [Beta image variants](https://github.com/docker-library/wordpress/tree/master/beta): `beta`
- [CLI image variants](https://github.com/docker-library/wordpress/tree/master/cli): `cli`

### Container Startup

- [Apache startup](https://github.com/docker-library/wordpress/blob/master/latest/php8.2/apache/docker-entrypoint.sh): `latest/php8.2/apache/docker-entrypoint.sh`
- [FPM startup](https://github.com/docker-library/wordpress/blob/master/latest/php8.2/fpm/docker-entrypoint.sh): `latest/php8.2/fpm/docker-entrypoint.sh`
- [Shared startup](https://github.com/docker-library/wordpress/blob/master/docker-entrypoint.sh): `docker-entrypoint.sh`

### Site Configuration

- [Environment configuration](https://github.com/docker-library/wordpress/blob/master/wp-config-docker.php): `wp-config-docker.php`

### Other components

- **Image user**
- **Docker runtime**
- **WordPress site**
- **WordPress database**
- **Container environment**

## Connections

- Image user → Docker runtime: runs image (evidence: `README.md`)
- Docker runtime → Release and runtime variants: runs variant
- Release and runtime variants → Apache image definition: offers Apache
- Release and runtime variants → FPM image definition: offers FPM
- Release and runtime variants → Beta image variants: offers beta
- Release and runtime variants → CLI image variants: offers CLI
- Docker runtime → Apache startup: starts container
- Docker runtime → FPM startup: starts container
- Apache startup → Shared startup: delegates startup
- FPM startup → Shared startup: delegates startup
- Shared startup → Environment configuration: uses configuration
- Container environment → Environment configuration: provides settings (evidence: `wp-config-docker.php`)
- Environment configuration → WordPress site: configures site
- Environment configuration → WordPress database: sets connection settings (evidence: `wp-config-docker.php`)
