Hosting Requirements
Server specifications, PHP versions, required extensions, database requirements, and infrastructure recommendations for Multi Host deployments.
Multi Host runs on standard PHP hosting infrastructure. This page details the specific requirements for different deployment scales and features.
Minimum Requirements
These specifications support basic installations with moderate traffic:
| Component | Minimum | Recommended | |-----------|---------|-------------| | PHP Version | 7.4 | 8.1 or later | | MySQL/MariaDB | 5.7 / 10.3 | 8.0 / 10.6 | | Memory | 256 MB | 512 MB+ | | Storage | 1 GB + uploads | SSD recommended | | Web Server | Apache 2.4 or Nginx 1.18 | Current stable |
Shared hosting plans meeting these specifications work for personal or small community deployments. Larger installations benefit from dedicated resources.
PHP Configuration
Required Extensions
These extensions must be installed and enabled:
- gd or imagick - Image processing and thumbnail generation
- mysqli or pdo_mysql - Database connectivity
- mbstring - Multibyte string handling for Unicode
- json - Data serialisation (built-in on PHP 8+)
- fileinfo - MIME type detection for upload validation
- curl - Remote URL fetching and API integrations
Verify installed extensions with:
php -m | grep -E "(gd|imagick|mysqli|mbstring|json|fileinfo|curl)"
Recommended Extensions
These extensions enable additional features or improve performance:
- opcache - Bytecode caching for faster PHP execution
- apcu - User-space caching for session and data caching
- exif - Image orientation handling and metadata extraction
- zip - Batch download and archive features
- intl - Internationalisation for date/number formatting
PHP Settings
Adjust these php.ini values based on your deployment needs:
; Upload handling
upload_max_filesize = 20M
post_max_size = 25M
max_file_uploads = 20
; Execution limits
max_execution_time = 120
max_input_time = 120
memory_limit = 256M
; Security
expose_php = Off
display_errors = Off
log_errors = On
; Sessions
session.cookie_secure = On
session.cookie_httponly = On
session.cookie_samesite = Strict
For installations accepting large uploads (50MB+), increase limits proportionally and consider chunked upload configuration.
Database Requirements
MySQL / MariaDB
Multi Host requires MySQL 5.7+ or MariaDB 10.3+ with:
- InnoDB storage engine for transaction support
- utf8mb4 character set for full Unicode including emoji
- Sufficient
max_allowed_packetfor large text fields (16M minimum) - Adequate
innodb_buffer_pool_sizefor your data volume
Database sizing depends on usage patterns. The database stores metadata rather than file content, so storage needs grow slowly. A typical installation with 100,000 uploads uses under 500MB of database storage.
Connection Limits
Busy installations may need increased connection limits:
max_connections = 200
wait_timeout = 300
Connection pooling through PHP-FPM helps manage connections efficiently across many concurrent requests.
Web Server Configuration
Apache
Apache requires these modules:
- mod_rewrite - URL rewriting for clean URLs
- mod_headers - Security and cache headers
- mod_expires - Cache control for static assets
- mod_deflate - Response compression
Enable modules with:
a2enmod rewrite headers expires deflate
systemctl restart apache2
Nginx
Nginx handles static files efficiently and works well with PHP-FPM. Key configuration points:
- Proper
try_filesdirective for URL routing - FastCGI configuration for PHP processing
- Client body size limits matching upload requirements
- Gzip compression for text responses
A minimal Nginx configuration:
server {
listen 443 ssl http2;
server_name example.com;
root /var/www/html;
client_max_body_size 25M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(jpg|jpeg|png|gif|webp|ico|css|js)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
}
Storage Considerations
Filesystem
Local storage remains common for uploads. Consider:
- SSD storage for cache and thumbnail directories
- Separate partition for uploads to isolate from system storage
- Appropriate filesystem - ext4 or XFS handle many small files well
- Regular monitoring of storage capacity
Object Storage
For larger deployments, object storage provides scalability:
- Amazon S3 or S3-compatible services (MinIO, Backblaze B2)
- Direct-to-storage uploads reduce server load
- CDN integration for global delivery
The Storage and Paths documentation covers configuration for different storage backends.
Memory and Processing
Image Processing
Thumbnail generation consumes significant memory, especially for large images. A 20-megapixel image may require 200MB+ during processing. Configure:
memory_limit = 512M ; For large image support
Consider ImageMagick over GD for better memory efficiency with large files. ImageMagick processes images in streams rather than loading entirely into memory.
Concurrent Users
Estimate PHP-FPM worker processes based on expected concurrency:
workers = available_memory / memory_per_request
A server with 4GB available for PHP and 128MB average per request supports approximately 32 concurrent processes. Adjust based on observed memory usage.
Network Requirements
Bandwidth
Image hosting consumes significant bandwidth. Estimate needs based on:
- Average image size × daily views = daily bandwidth
- Peak traffic multipliers (often 3-5× average)
- Geographic distribution (CDN reduces origin bandwidth)
Firewall Rules
Required inbound access:
- Port 443 - HTTPS traffic
- Port 80 - HTTP (redirect to HTTPS)
Outbound access for:
- DNS resolution - Package updates, external integrations
- SMTP - If using external mail servers
- Object storage - If using S3-compatible backends
Scaling Considerations
Vertical Scaling
Increasing server resources helps to a point:
- More CPU cores improve concurrent request handling
- Additional memory supports more PHP workers
- Faster storage reduces I/O bottlenecks
Horizontal Scaling
For high-traffic deployments:
- Load balancer distributing requests across application servers
- Shared storage (NFS, object storage) accessible from all nodes
- Centralised sessions (Redis, database) for stateful features
- Database replication for read scaling
The reverse proxy guide covers load balancer and CDN configuration patterns.
Hosting Provider Compatibility
Shared Hosting
Many shared hosts work for smaller installations:
- Verify PHP version and extension availability
- Check upload size limits (often restricted)
- Confirm cron job access for background tasks
- Review storage quotas against expected growth
VPS / Cloud
Virtual private servers provide more control:
- Full configuration access
- Scalable resources
- Better suited for moderate-to-high traffic
- Requires more administration knowledge
Managed Platforms
Platforms like Cloudways, RunCloud, or Laravel Forge simplify server management while providing VPS-level control.
Frequently Asked Questions
Yes, Multi Host supports current PHP 8.x versions. Running the latest stable PHP version is recommended for security patches and performance improvements. Test thoroughly after PHP upgrades as some hosting configurations may need adjustment.