Features Pricing Docs Blog Log In Get Started Free

PHP Settings & Tuning

PHP Settings & Performance Tuning

Fine-tune PHP configuration per site for optimal performance.

Configurable Settings

Setting Default Range Description
memory_limit 256M 64M-512M Max memory PHP can use per request
max_execution_time 30s 30-300s Max time a script can run
upload_max_filesize 64M 8M-128M Max file upload size
post_max_size 64M 8M-128M Max POST request body size
max_input_vars 1000 500-5000 Max form fields (increase for WooCommerce)
max_input_time 60s 30-300s Max time to parse input data

Presets

One-click presets optimize PHP for common use cases:

Preset Memory Upload Execution Best For
Starter 128M 32M 30s Simple blogs, brochure sites
Blog 256M 64M 60s Content-heavy blogs with media
WooCommerce 512M 64M 120s Online stores with many products
Heavy 512M 128M 300s Page builders, large imports, complex plugins
Minimal 64M 8M 30s Minimal resource usage, static-like sites

Auto-Tune

Click “Auto-Tune” and BlitzPress will calculate optimal settings based on:

  • Available server RAM (reserves 856MB for OS, Redis, OLS, MariaDB)
  • Number of sites on the server
  • Average PHP worker memory usage (~60MB per worker)
  • CPU cores (4-8 workers per core)

The algorithm calculates a fair-share allocation per site with a 2x ceiling multiplier.

PHP Process Manager Settings

Advanced users can tune the PHP process manager (PM):

Setting Description Range
pm.max_children Max simultaneous PHP workers 3-20
pm.start_servers Workers started on boot Auto-calculated
pm.min_spare_servers Min idle workers Auto-calculated
pm.max_spare_servers Max idle workers Auto-calculated
pm.max_requests Requests before worker recycles 500-1000

Where Settings Are Stored

Per-site PHP settings are written to .user.ini files processed by OLS LSAPI. The configuration file path is:

/usr/local/lsws/lsphp{VERSION}/etc/php/{X.Y}/litespeed/conf.d/blitzpress-{domain}.ini