# klyp/wordpress-core-installer architecture

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

- Interactive diagram: https://gitdiagram.com/klyp/wordpress-core-installer
- Repository: https://github.com/klyp/wordpress-core-installer

## Overview

This is a Composer plugin that installs packages of type `wordpress-core` outside `vendor/`. The workflow is: Composer activates the plugin, the plugin registers an installer, and Composer delegates core package operations to it. The installer chooses a directory from the root project’s configuration, checks that it is safe and non-overlapping, then delegates installation, update, or removal to Composer’s library installer. The sampled source supports the registration and validation flow; README statements establish the user-facing install behavior.

Main entry points: [`src/Installer.php`](https://github.com/klyp/wordpress-core-installer/blob/master/src/Installer.php) (Core installer), [`src/Plugin.php`](https://github.com/klyp/wordpress-core-installer/blob/master/src/Plugin.php) (Plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_registration["Plugin registration"]
  node_plugin["Plugin<br/>[Plugin.php]"]
end

subgraph group_installation["Core installation"]
  node_installer["Core installer<br/>[Installer.php]"]
  node_directory_checks["Directory safety checks<br/>[Installer.php]"]
  node_library_installer["Library installer"]
end

node_composer(("Composer"))
node_root_config["Root project config"]
node_core_package["wordpress-core package"]
node_manager["Installation manager"]
node_filesystem["Project filesystem"]

node_composer -->|"activates"| node_plugin
node_plugin -->|"registers installer"| node_manager
node_manager -.->|"dispatches operations"| node_installer
node_core_package -.->|"install target"| node_installer
node_installer -->|"reads directory setting"| node_root_config
node_installer -->|"validates path"| node_directory_checks
node_directory_checks -->|"checks directories"| node_filesystem
node_installer -->|"delegates operations"| node_library_installer
node_composer -->|"installs core"| node_filesystem

click node_plugin "https://github.com/klyp/wordpress-core-installer/blob/master/src/Plugin.php"
click node_installer "https://github.com/klyp/wordpress-core-installer/blob/master/src/Installer.php"
click node_directory_checks "https://github.com/klyp/wordpress-core-installer/blob/master/src/Installer.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_plugin toneBlue
class node_installer,node_directory_checks,node_library_installer toneAmber
class node_composer,node_root_config,node_core_package,node_manager,node_filesystem toneIndigo
```

## Components

### Plugin registration

- [Plugin](https://github.com/klyp/wordpress-core-installer/blob/master/src/Plugin.php): `src/Plugin.php`

### Core installation

- [Core installer](https://github.com/klyp/wordpress-core-installer/blob/master/src/Installer.php): `src/Installer.php`
- [Directory safety checks](https://github.com/klyp/wordpress-core-installer/blob/master/src/Installer.php): `src/Installer.php`
- **Library installer**

### Other components

- **Composer**
- **Root project config**
- **wordpress-core package**
- **Installation manager**
- **Project filesystem**

## Connections

- Composer → Plugin: activates
- Plugin → Installation manager: registers installer (evidence: `src/Plugin.php`)
- Installation manager → Core installer: dispatches operations
- wordpress-core package → Core installer: install target
- Core installer → Root project config: reads directory setting (evidence: `README.md`)
- Core installer → Directory safety checks: validates path (evidence: `src/Installer.php`)
- Directory safety checks → Project filesystem: checks directories (evidence: `src/Installer.php`)
- Core installer → Library installer: delegates operations (evidence: `src/Installer.php`)
- Composer → Project filesystem: installs core (evidence: `README.md`)
