PHP-FPM Configuration

Updated 14 Nov 2026 Published

PHP-FPM Configuration

VinzaPanel runs PHP through PHP-FPM, and every hosting account gets its own pool per PHP version. PHP code therefore runs as the site owner's Linux user, not as a shared www-data user — a compromised site cannot read other accounts' files. This works the same on Nginx, Apache2 and OpenLiteSpeed.

How the per-user pools work

ItemValue
Pool file/etc/php/<version>/fpm/pool.d/vinza-<user>.conf
Socket/run/php/php<version>-<user>.sock
Runs asThe site owner (user and group)
Process managerpm = ondemand — idle pools use almost no memory (idle workers stop after 10 seconds; each worker is recycled after 500 requests)
Workerspm.max_children = the PHP Workers value of the owner's hosting plan, between 2 and 64 (10 for accounts without a plan)
File accessopen_basedir limited to the owner's home, /tmp/, the PHP session store and /usr/share/php/
Disabled functionsexec, passthru, shell_exec, system, proc_open, popen

A pool is created automatically the first time an account gets a PHP site on that version. Changing a plan's PHP Workers updates the pools of every account on that plan.

Warning

The vinza-<user>.conf pools are regenerated by the panel — don't edit them by hand, your changes will be overwritten. To give an account more PHP workers, change its hosting plan. The slow log and status page you set on the Pools tab are re-applied automatically after each regeneration.

Changing a website's PHP version

  1. Open Websites and click the domain.
  2. On the Overview or Advanced tab, click the PHP version (Change version).
  3. Pick the new version and click Apply. The web server configuration is updated and reloaded automatically.

Change PHP Version dialog for a website with the PHP version selector

A site on a Vinza Server node uses the PHP versions installed on that node.

Per-site PHP settings

On Apache2 and OpenLiteSpeed, values such as upload_max_filesize, post_max_size, memory_limit and max_execution_time can be set per website from Web Rules on the website page (Upload and PHP tabs). The panel writes them to the site's .user.ini, which PHP-FPM reads — no need to touch the server-wide php.ini. On OpenLiteSpeed this applies when the site uses the panel's PHP-FPM pool, not an lsphp build.

On Nginx, Web Rules sets the maximum request body size (client_max_body_size); other PHP values come from the version's php.ini (see PHP Settings below), or you can place a .user.ini in the document root yourself.

Note

Every PHP version's php.ini gets a 50 MB upload limit (upload_max_filesize and post_max_size) when it still has PHP's stock values — on install, on a new version and on update. A value you set yourself is never changed back.

Managing PHP versions (administrators)

Open Server → PHP-FPM (/apps/php-fpm/). PHP-FPM is a built-in app. The page has five tabs: Overview, Pools, PHP Settings, Modules and Install Extensions.

PHP-FPM page Overview tab listing the installed PHP versions with their status and actions

  • Overview — every installed version with its status, pools, socket and the Path of its PHP CLI binary (use it for cron jobs and workers), plus start/stop/restart/reload buttons. Set Default makes a version the default CLI PHP. The info button lists where everything of a version lives: CLI and FPM binaries, both php.ini files, php-fpm.conf, enabled extensions, pool configs, socket, FPM log and the extension directory.
  • Install PHP Version — choose a version (8.5 down to 7.4) and click Start Installation. It installs PHP-FPM and common extensions (takes 1–5 minutes). On Ubuntu the ppa:ondrej/php repository is added, on Debian the Sury repository, when the version is not in the base repositories. This installs PHP on the panel server only; for a node, install it from Vinza Server → node → Components.
  • Uninstall PHP Version — removes all PHP packages of that version, including its pools and configuration files. Move websites to another version first.
  • Pools — view and edit pool files, or create a New Pool with its own user and socket. Per pool you can also switch on the Slowlog (log requests slower than N seconds, 0 = off) and a Status page, answered on the pool socket only, whose numbers show under Live status. An edit that PHP-FPM rejects is reverted and its error shown.
  • PHP Settings — edit the commonly tuned php.ini values of a version and click Save & Reload.
  • Modules — see enabled and available extensions and toggle them per version.
  • Install Extensions — install an extra extension package for a version (for example imagick, intl, redis or mongodb) from an allow-list; PHP-FPM is reloaded afterwards.

Updates

Packages from the ondrej or Sury repositories are not updated by the system's automatic security updates. The Updates card at the top of the page shows PHP versions that are behind the release in their repository, and Update upgrades one version with its extensions, tests the FPM configuration and restarts it.

Custom PHP backend

An application that needs a PHP version your OS does not ship can use Custom PHP Backend (administrators) in the website's form. It sends that site's PHP to a local FastCGI server (for example a php:8.3-fpm container) instead of the account's pool. Leave it empty to use the normal PHP version.

Troubleshooting

# Test the configuration of one PHP version
sudo php-fpm8.3 -t

# Status of a PHP-FPM version
sudo systemctl status php8.3-fpm

# Check that a user's pool socket exists
ls -l /run/php/php8.3-USER.sock

A 502 Bad Gateway on a PHP site usually means the owner's pool is missing or PHP-FPM for that version is stopped. Start the version on the PHP-FPM page, or save the website's Edit form, which recreates the pool. Sites of a suspended account have no pool on purpose; unsuspending the account brings it back.

To restart a PHP-FPM version automatically when it stops answering, install PHP Guardian from the Vinza Store. To refuse PHP files in upload folders, use Block PHP in folders on the website's Advanced tab (see Creating Websites).

On this page