🧰 System Requirements
This guide lists the minimum and recommended requirements to run PhPstrap smoothly in development and production.
TL;DR: PHP 8.1+, MySQL/MariaDB, Apache or Nginx, and common PHP extensions (PDO, cURL, JSON, OpenSSL, Zip, GD). Ensure
config/, cache/, uploads/, and logs/ are writable.
✅ Minimum Requirements
- PHP: 8.1 or newer
- Database: MySQL 5.7+ or MariaDB 10.4+
- Web Server: Apache 2.4+ (with
mod_rewrite) or Nginx 1.18+ - Disk Permissions: Writable
/config,/cache,/uploads,/logs - Extensions (required):
- PDO + PDO MySQL
- mbstring
- curl
- json
- openssl
- zip
- gd
💡 Recommended (Production)
- PHP: 8.2 or 8.3
- OPcache: Enabled for faster performance
- Database: MySQL 8.0+ or MariaDB 10.6+
- HTTPS: Valid TLS certificate (LetsEncrypt or equivalent)
- Memory limit: 256M or higher
- Max execution time: 60–120s (installer/updates unzip safely)
- Upload limits: 10–50MB (
upload_max_filesize,post_max_size) - Time zone: Set
date.timezone(e.g.,UTC)
🔌 PHP Extensions (Details)
Required
pdo,pdo_mysql— database accessmbstring— multibyte string handlingcurl— GitHub updater, external requestsjson— config, module settings, APIsopenssl— secure HTTPS requestszip— installer/updater archive operationsgd— image manipulations (avatars, assets)
Optional / Nice to Have
intl— better date/locale formattingimagick— higher quality image processingldap— enterprise auth (future modules)redis— caching (future optimization)
🗄️ Database
- Use UTF-8 (utf8mb4) charset and
utf8mb4_unicode_cicollation. - Ensure the DB user can
CREATE,ALTER,INDEX, andINSERT/UPDATE/DELETE. - Installer creates tables and inserts defaults; no manual SQL required.
🌐 Web Server
Apache
- Enable
mod_rewrite(pretty URLs / future modules). - Honor project
.htaccessfor basic hardening and rewrites.
Nginx
- Route PHP requests to PHP-FPM.
- Allow access to
/assets,/uploads, deny direct access to/config,/logs,/installer.
🔐 File & Directory Permissions
- Directories: 755
- Files: 644
- Writable by PHP:
/config,/cache,/uploads,/logs - Production tip: Make
/configwritable only during installation/updates, then revert.
⚙️ PHP ini Settings (Suggested)
| Directive | Recommended | Notes |
|---|---|---|
memory_limit | 256M | More for large imports/updates |
max_execution_time | 60–120 | Installer/Updater unzip + copy |
upload_max_filesize | 10–50M | Adjust to your content needs |
post_max_size | 10–50M | ≥ upload_max_filesize |
date.timezone | UTC | Or your region (e.g., Europe/London) |
opcache.enable | On | Significant performance boost |
expose_php | Off | Minor security hardening |
display_errors | Off (prod) | On in dev only |
log_errors | On | Log to file, not screen |
🔎 What the Installer Checks
The installer performs a quick environment scan similar to:
- PHP version and required extensions (PDO, mbstring, curl, json, openssl, zip, gd)
- Directory writability:
/config,/cache,/uploads,/logs - Database connectivity (host, port, user, permissions)
- Optional features: OPcache, ZipArchive, etc.
🧯 Troubleshooting
- “Cannot connect to DB” — verify host, port (usually 3306), credentials, and GRANT permissions.
- “ZipArchive missing” — install/enabled
zip+ZipArchivein PHP. - “Permission denied” — ensure web server user can write to
/config,/cache,/uploads,/logs. - “Updater can’t fetch GitHub” — enable
curland outbound HTTPS; optionally setGITHUB_TOKENin env. - White page/500 — check
logs/and web server error logs; disabledisplay_errorsin production.
Need help verifying your environment? Run the installer’s Requirements step or open an issue on GitHub.