# onliveserver/oswp architecture

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

- Interactive diagram: https://gitdiagram.com/onliveserver/oswp
- Repository: https://github.com/onliveserver/oswp

## Overview

OSWP is a small Bash command-line tool for maintaining WordPress sites hosted under cPanel. An administrator selects users or all users; OSWP scans the documented home directories for installations, then performs updates and cleanup, with an optional force-reinstall mode. The README documents these capabilities and WP-CLI as a requirement, but no source excerpts were available, so internal call order and implementation details cannot be verified.

Main entry points: [`oswp.sh`](https://github.com/onliveserver/oswp/blob/main/oswp.sh) (Installation scanning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Targeting and discovery"]
  node_cli["OSWP command<br/>[oswp.sh]"]
  node_targeting["User selection<br/>[oswp.sh]"]
  node_discovery["Installation scanning<br/>[oswp.sh]"]
end

subgraph group_maintenance["WordPress maintenance"]
  node_core["Core updates<br/>[oswp.sh]"]
  node_plugins["Plugin updates and cleanup<br/>[oswp.sh]"]
  node_themes["Theme updates and cleanup<br/>[oswp.sh]"]
  node_permissions["Permission fixes<br/>[oswp.sh]"]
  node_force["Force reinstall<br/>[oswp.sh]"]
end

subgraph group_external["External environment"]
  node_wpcli["WP-CLI"]
  node_hosting["cPanel home directories"]
end

node_admin(("Administrator"))

node_admin -->|"runs"| node_cli
node_cli -->|"accepts targets"| node_targeting
node_targeting -->|"selects installations"| node_discovery
node_discovery -->|"scans directories"| node_hosting
node_discovery -->|"updates core"| node_core
node_discovery -->|"updates and removes"| node_plugins
node_discovery -->|"updates and cleans"| node_themes
node_discovery -->|"fixes permissions"| node_permissions
node_cli -->|"offers force mode"| node_force
node_force -->|"reinstalls"| node_core
node_force -->|"reinstalls"| node_plugins
node_force -->|"reinstalls"| node_themes
node_core -->|"uses"| node_wpcli
node_plugins -->|"uses"| node_wpcli
node_themes -->|"uses"| node_wpcli

click node_cli "https://github.com/onliveserver/oswp/blob/main/oswp.sh"
click node_targeting "https://github.com/onliveserver/oswp/blob/main/oswp.sh"
click node_discovery "https://github.com/onliveserver/oswp/blob/main/oswp.sh"
click node_core "https://github.com/onliveserver/oswp/blob/main/oswp.sh"
click node_plugins "https://github.com/onliveserver/oswp/blob/main/oswp.sh"
click node_themes "https://github.com/onliveserver/oswp/blob/main/oswp.sh"
click node_permissions "https://github.com/onliveserver/oswp/blob/main/oswp.sh"
click node_force "https://github.com/onliveserver/oswp/blob/main/oswp.sh"

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_cli,node_targeting,node_discovery toneBlue
class node_core,node_plugins,node_themes,node_permissions,node_force toneAmber
class node_wpcli,node_hosting toneMint
class node_admin toneIndigo
```

## Components

### Targeting and discovery

- [OSWP command](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`
- [User selection](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`
- [Installation scanning](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`

### WordPress maintenance

- [Core updates](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`
- [Plugin updates and cleanup](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`
- [Theme updates and cleanup](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`
- [Permission fixes](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`
- [Force reinstall](https://github.com/onliveserver/oswp/blob/main/oswp.sh): `oswp.sh`

### External environment

- **WP-CLI**
- **cPanel home directories**

### Other components

- **Administrator**

## Connections

- Administrator → OSWP command: runs (evidence: `README.md`)
- OSWP command → User selection: accepts targets (evidence: `README.md`)
- User selection → Installation scanning: selects installations (evidence: `README.md`)
- Installation scanning → cPanel home directories: scans directories (evidence: `README.md`)
- Installation scanning → Core updates: updates core (evidence: `README.md`)
- Installation scanning → Plugin updates and cleanup: updates and removes (evidence: `README.md`)
- Installation scanning → Theme updates and cleanup: updates and cleans (evidence: `README.md`)
- Installation scanning → Permission fixes: fixes permissions (evidence: `README.md`)
- OSWP command → Force reinstall: offers force mode (evidence: `README.md`)
- Force reinstall → Core updates: reinstalls (evidence: `README.md`)
- Force reinstall → Plugin updates and cleanup: reinstalls (evidence: `README.md`)
- Force reinstall → Theme updates and cleanup: reinstalls (evidence: `README.md`)
- Core updates → WP-CLI: uses (evidence: `README.md`)
- Plugin updates and cleanup → WP-CLI: uses (evidence: `README.md`)
- Theme updates and cleanup → WP-CLI: uses (evidence: `README.md`)
