PHP
Use the PHP Config menu (page title PHP Configuration) to choose the PHP version of each website, turn PHP extensions on or off, and change php.ini settings within your package limits.
What the page shows depends on your server type:
| Server type | PHP version applies to | Sections shown |
|---|---|---|
| Standard server (PHP-FPM) | Each website, can differ per website | Version per website, installed versions, PHP INI editor, extensions |
| CloudLinux server (PHP Selector) | All websites of the account at once | Account version, extensions, PHP options |
Saving changes
Changes on this page are collected first. The top right shows the number of unsaved changes, e.g. "2 unsaved changes". Click Save & apply to apply them all at once.
Changed rows are marked Unsaved. Click Undo to revert a row before saving.
INFO
Saving extension or INI changes restarts PHP for the websites on that version. Visitors may notice a very short pause.
Standard server (PHP-FPM)
PHP version per website
The PHP version per website table lists each website with its PHP version, status, and document root.
The table shows 10 websites per page. Below it you see the position, e.g. "1–10 of 24 websites", and how many rows have unsaved changes. A version you pick on one page stays selected when you move to another page, so you can save changes on several pages at once.
- Choose a version in the PHP version column of the website row.
- Click Save & apply.
Version choices:
- (Default): follows the server default version. This version can always be chosen.
- Other versions installed on the server. If your package does not restrict versions, every installed version can be chosen, including old ones.
- Versions that have reached end of life are marked EOL. You can still choose them, but they no longer get security fixes.
- If your hosting provider restricts versions in your package, only those versions appear.
The Fallback status means the chosen version is not installed on the server, so the website runs on the default version. For example: "PHP 5.6 is not installed; running 8.3". Choose an installed version to clear this status.
You can also change the PHP version from the Manage page of a website on the Website page.
Installed PHP versions
The Installed PHP versions panel shows the versions available on the server and their status:
| Status | Meaning |
|---|---|
| Supported / Active and maintained | Still supported and receiving fixes. |
| Security fixes until … | Only receives security fixes until that date. |
| End of life | No longer supported. Move to a newer version soon. |
| Not in plan | Not included in your package. Only shown when your package restricts PHP versions. |
The panel also shows the number of concurrent PHP processes per website, e.g. "Up to 20 concurrent PHP processes per website." This number follows your package's Entry Process limit.
PHP INI editor
The PHP INI editor sets php.ini for all websites of the account and all PHP versions. Empty fields use the server default. Each field shows its default value and maximum.
| Directive | Limit |
|---|---|
memory_limit | Up to the package memory limit, at most 1024M |
upload_max_filesize, post_max_size | At most 1024M |
max_execution_time, max_input_time | At most 300 seconds |
max_input_vars | At most 20000 |
session.gc_maxlifetime | At most 86400 seconds |
display_errors, short_open_tag, allow_url_fopen, zlib.output_compression, brotli.output_compression | On or Off |
error_reporting, output_buffering | Choice from a list |
date.timezone | A valid time zone, e.g. America/New_York |
To reset all options to the defaults, click Reset and confirm.
brotli.output_compression sends PHP pages compressed with brotli to browsers that support it. It needs the brotli PHP extension on the server; ask your hosting provider if it has no effect.
Large uploads fail?
Raise upload_max_filesize and post_max_size together. post_max_size should be equal to or larger than upload_max_filesize.
INFO
Except for memory_limit, applications can still change the directives above with ini_set(). Security settings such as open_basedir and disable_functions are set by the server and cannot be changed.
PHP extensions
PHP extensions are set per PHP version.
- Choose the PHP version in the extensions panel.
- Find an extension with Search extensions….
- Turn the extension on or off.
- Click Save & apply.
Extensions marked Required by other extensions are locked and cannot be turned off, e.g. mysqlnd, pdo, xml, dom, mbstring, ctype, tokenizer, and json.
New extensions that your hosting provider installs on the server are turned on automatically.
CloudLinux server (PHP Selector)
If the server uses CloudLinux, the page shows the note "CloudLinux PHP Selector: the version applies to every website of this account right away after saving." One PHP version applies to all websites of the account.
- Choose the PHP version. The version in use is marked In use and shown after Current:.
- Set the extensions for that version. Extensions marked Built-in are always on.
- Set the PHP options. Empty fields use the server default.
- Click Save & apply.
The Native PHP choice uses the server's built-in PHP. Extensions and php.ini options of the native PHP are managed by the server, so you cannot change them here. Choose another PHP version if you want to manage them yourself.
To reset extensions or options to the server defaults, click Reset in the respective panel and confirm.
See also
- Websites
- Website health for PHP errors
- Package features and limits
