Admin

PHP Settings

Set server-wide PHP version defaults and php.ini baseline values for new hosting accounts.

Last updated 1775606400

Server Mode → Settings → PHP Settings defines the PHP defaults that new hosting accounts inherit. Account owners can override these within the limits you set here.

Default PHP Version

The PHP version assigned to new accounts if no version is specified at creation time. This does not change the PHP version for existing accounts.

Available versions depend on which PHP-FPM versions are installed on the server. To check:

systemctl list-units 'php*-fpm' --state=active

Accounts can switch their own PHP version from Hosting Mode → PHP at any time. See PHP Versions.

Default php.ini Values

These values are written to the PHP-FPM pool configuration for each new account at creation time. Existing accounts are not affected when you change these settings.

Setting Recommended starting value Notes
memory_limit 256M Most WordPress/Laravel apps need at least 128M
upload_max_filesize 64M Must be ≤ post_max_size
post_max_size 64M Should be ≥ upload_max_filesize
max_execution_time 60 In seconds. Long-running scripts may need higher.
max_input_vars 3000 WordPress with many settings can exceed 1000

Min/Max Limits

Set the minimum and maximum values that account owners are allowed to configure for each setting. The Panel enforces these limits when an account owner changes their PHP settings from Hosting Mode.

Example: if you set max memory_limit to 512M, an account owner attempting to set memory_limit = 1024M will receive a validation error.

Setting Suggested maximum
memory_limit 512M
upload_max_filesize 256M
max_execution_time 300

Set a value to 0 to impose no limit for that setting (not recommended — a misconfigured account could exhaust server RAM).

Note: Setting max_execution_time to 0 means scripts run until they finish or crash. PHP scripts with infinite loops or deadlocks will hold the PHP-FPM worker until the process is killed manually. Keep a reasonable cap.

Applying Defaults to Existing Accounts

The defaults and min/max limits only apply at account creation time and when an account owner saves their PHP settings (limits are re-validated on save). To bulk-apply new defaults to all existing accounts:

php /opt/opterius/artisan php:apply-defaults --all

This rewrites each account's PHP-FPM pool file with the current default values. It does not override values that are already within the allowed min/max range — only values outside the new limits are clamped.

Related