cwp-phplisted
Install: claude install-skill fattain-naime/cwp-superpowers
# CWP PHP Management
Manage PHP versions, extensions, and configurations on CWP servers. Handle PHP Switcher, PHP Selector, PHP-FPM Selector, and security hardening for PHP.
## PHP Version Management Tools
Use three distinct tools for PHP version management:
| Tool | Behavior | Versions | Use Case |
|---|---|---|---|
| **PHP Switcher** | ONE default PHP for all users | 5.3-8.1+ | Simple setups |
| **PHP Selector** | Multiple versions via .htaccess | 4.4-8.1 | Per-folder version |
| **PHP-FPM Selector** | Per-domain via Domain Conf | 5.3-8.1+ | Per-domain (CWP Pro) |
### PHP Switcher
Sets a single default PHP version compiled from source for the entire server.
```bash
# Rebuild PHP via Switcher
/scripts/phpfpm_rebuild_user_conf
# Compile log location
tail -f /var/log/php-rebuild.log
```
### PHP Selector
Allows multiple PHP versions simultaneously. Users select versions per folder via `.htaccess`.
```apache
# Per-folder PHP version via .htaccess
AddHandler application/x-httpd-php56 .php # PHP 5.6
AddHandler application/x-httpd-php74 .php # PHP 7.4
AddHandler application/x-httpd-php81 .php # PHP 8.1
```
### PHP-FPM Selector (CWP Pro)
Per-domain PHP-FPM configuration via the Domain Conf panel.
## Configuration Paths
| Component | Path |
|---|---|
| Main PHP php.ini | `/usr/local/php/php.ini` |
| Main PHP config dir | `/usr/local/php/php.d/` |
| Per-user php.ini | `/home/USERNAME/php.ini` |
| Selector PHP binaries | `/opt/alt/php{VERSION}/usr/bin/php` |
| S