cwp-performancelisted
Install: claude install-skill fattain-naime/cwp-superpowers
# CWP Performance Optimization
If the user provides specific details via "$ARGUMENTS", focus the optimization on that component. For example: `/cwp-pro-centos:cwp-performance optimize MySQL` will focus on database tuning.
Optimize server performance on CWP servers through caching, compression, PHP-FPM tuning, database optimization, and web server configuration.
## Performance Stack Overview
Use multiple caching and optimization layers:
| Layer | Options |
|---|---|
| Web Server | Apache, Nginx, Varnish |
| PHP Caching | OPcache, APC |
| Object Cache | Memcached, Redis |
| Compression | Brotli, gzip |
| Application | LiteSpeed Cache, WordPress caching plugins |
## Service Detection
Detect which caching services are installed:
```bash
# Redis
systemctl is-active redis 2>/dev/null && echo "Redis: active" || echo "Redis: not running"
# Memcached
systemctl is-active memcached 2>/dev/null && echo "Memcached: active" || echo "Memcached: not installed"
# Varnish
systemctl is-active varnish 2>/dev/null && echo "Varnish: active" || echo "Varnish: not running"
# OPcache (check PHP)
php -m 2>/dev/null | grep -i opcache && echo "OPcache: loaded" || echo "OPcache: not loaded"
```
## Caching Compatibility
| Cache | suPHP | PHP-FPM |
|---|---|---|
| Varnish | Yes | Yes |
| Memcached | Yes | Yes |
| Redis | Yes | Yes |
| OPcache | No | Yes |
| APC | No | Yes |
**Note:** OPcache and APC require PHP-FPM mode, not suPHP.
## Varnish Cache
### Configuration
| File | Purpose |
|---