PHP Configuration
App Servers come with PHP installed and configured. A server can run several PHP versions side by side. The server's PHP settings section installs and removes versions, updates them to new patch releases, and edits each version's php.ini values without opening an SSH session.
Open the server from System → Servers and pick PHP settings under Configure. Changes here need server:update.
PHP versions #
The top box lists what is installed. Install version opens Install a PHP version: it installs PHP-FPM, the CLI and the standard extensions next to the versions already on the server. Extensions that are not published for the chosen version are skipped and listed when the install finishes. The server default does not change.
Below it is one tab per installed version. The server default is marked · default: it is what php runs in the server terminal and in commands not tied to a project, and where new projects start. Each project stays on the version it is set to; a project’s version is chosen in its PHP section.
The … menu next to the tabs acts on the selected version:
- Edit PHP-FPM configuration and Edit PHP-CLI configuration — see Editing php.ini directly
- Extensions — the modules
php -mreports, and Install an extension, which installs thephp<version>-<name>package from the server’s PHP repository - Make server default
- Remove PHP … — refused while the version is the server default or a project, scheduled job or background job still uses it; the refusal lists what uses it
Under the tabs, the section names the projects that use the selected version.
One PHP operation runs on a server at a time. While an install, removal, default switch, extension install, settings save or php.ini save runs, the other actions wait and the section shows what is running.
Patch releases #
The line under the version tabs shows the patch release the selected version runs, for example PHP 8.3.30, and when it was last checked. Depfloy checks every server once a day; Check for updates checks right away.
When the package source offers a newer build, the line shows it with an Update to … button. Security update marks a version that runs below the release carrying the latest security fixes for its branch.
Update upgrades only that version’s packages, keeps your edited php.ini and pool files, and restarts that version’s PHP-FPM; requests in flight on its sites can fail during the restart. Queue workers, Octane servers and other long-running PHP processes keep the previous build until they restart. The result lists them, by project where it can; deploy the project or restart the process from its Background Jobs section.
Settings for a version #
The PHP … settings box edits the selected version’s php.ini:
- Memory Limit —
memory_limit - Max Execution Time —
max_execution_time - Max Input Time —
max_input_time - Post Max Size —
post_max_size - Upload Max Filesize —
upload_max_filesize - OPcache Status — Enabled or Disabled
Update PHP … settings writes them for both PHP-FPM (web requests) and PHP-CLI (artisan, composer, scheduled tasks). OPcache applies to PHP-FPM.
A newly installed version starts with PHP’s stock values (for example memory_limit 128M and upload_max_filesize 2M); the default version’s values are not copied to it.
A project can override some of these values for itself; see Project PHP.
Editing php.ini directly #
For settings that are not surfaced as fields, Edit PHP-FPM configuration and Edit PHP-CLI configuration in the … menu open that version’s php.ini in an editor. Save Configuration asks first; saving the PHP-FPM file restarts PHP-FPM. Be deliberate: PHP can fail to start if a value conflicts with what Depfloy installed.
Restarting PHP-FPM #
Saving the PHP-FPM configuration restarts PHP-FPM. To restart it without a change, use the API (POST /api/v1/servers/{id}/services/php/restart, with an optional version) or the MCP tool restart_service with php. As with any service restart, expect a brief interruption while the worker pool comes back up.