English
PHP
FlashPanel lets you install several PHP versions on the same server, change the default version, set the upload size and execution time, enable/disable OPcache, and edit php.ini directly in the interface.
Installing PHP manually
FlashPanel only manages PHP versions installed through FlashPanel. Versions you install yourself from the command line will not appear in the dashboard.
Multiple PHP Versions
When you create a server, the PHP version you choose becomes the default version: it is preselected when you create a new website and is used for the php command in the terminal (PHP CLI).
You can then install additional versions. Each website picks its own PHP version, so websites on the same server can run different versions.
Install
- Open the server's Applications page and choose the
Not Installedtab. - Type
phpin the search box, click theInstallbutton (download icon) for the version you need, and confirm.
Once installed, the new version appears under the server's PHP menu (for example PHP > PHP 8.3) and can be selected when creating a website or changing a website's PHP version.
On the Applications page, each PHP row also has these buttons: Config (opens the configuration folder), Log, PHP Extensions (puzzle icon, to install extensions), Start, Restart, Stop, and Uninstall.
Uninstall
Click the Uninstall button (trash icon) for the PHP version on the Installed tab of the Applications page, then confirm.
Check before uninstalling
FlashPanel does not block uninstalling a PHP version that is still in use. Before uninstalling, make sure that:
- No website uses this version. Switch those websites to another version first.
- This version is not the server's PHP Default Version. If it is, switch the default to another version first (see below).
- No script, cron job, or daemon calls this version directly (for example
php8.1 artisan ...).
Websites still using an uninstalled version will not be able to run PHP.
PHP Management & Configuration
Choose PHP > the version to configure in the server menu. The top of the page shows the service status and management buttons (restart, log...). Below are feature cards; click a card to open it.
WARNING
Settings apply only to the PHP version you have open, except PHP Default Version, which is a server-wide setting. Servers running OpenLiteSpeed manage PHP differently, see OpenLiteSpeed.
ionCube Loader
ionCube Loader is an extension for running PHP files encoded with ionCube (common in commercial software).
Click the ionCube Loader card to see its status, then click Install or Uninstall and confirm. If the button shows Not Supported, ionCube has not released a loader for this PHP version.
Switch PHP Default Version
- Click the PHP Default Version card.
- Choose the version to use as the default.
- Click Update.
The default version is preselected when you create a new website and is used for the php command in the terminal. Existing websites keep the version they already use.
Maximum file upload size
Click the Max File Upload Size card, enter a value in megabytes (1024 = 1GB), and click Update.
This value is applied to upload_max_filesize and post_max_size of the PHP version you have open. The Nginx request size limit is raised to match, so you don't need to edit the Nginx configuration.
Maximum execution time
Click the Max Execution Time card, enter the number of seconds, and click Update.
This value is applied to max_execution_time of the PHP version you have open. The Nginx PHP timeout is updated to match.
OPcache
OPcache keeps compiled PHP code in memory, making websites significantly faster.
- Click the OPCache card. The icon on the card shows whether OPcache is enabled.
- Click Enable to turn it on or Disable to turn it off. PHP-FPM is restarted automatically.
When OPcache is enabled on a website you deploy code to
After each code update, OPcache may keep serving the old code. Add a PHP-FPM reload command at the end of your deploy script.
Detailed OPcache settings (memory, maximum files...) are edited in Update PHP.ini Configuration.
Update PHP.ini Configuration
You can edit common php.ini settings directly in the interface, without SSH.
- Choose PHP > the PHP version in the server menu.
- Choose a tab:
- PHP FPM INI: PHP configuration used by websites.
- PHP CLI INI: PHP configuration used by terminal commands, cron jobs, and daemons.
- Click Recommended to fill in recommended values, or adjust each option yourself. Each option has a short description in the interface.
- Click Update to save. The new configuration is applied automatically.
Available options:
| Option | Meaning |
|---|---|
memory_limit | Maximum RAM a script may use |
max_execution_time | Maximum run time (seconds) of a script |
max_input_time | Maximum time (seconds) to parse input data (POST, GET) |
max_input_vars | Maximum number of input variables per request |
upload_max_filesize | Maximum size (MB) of an uploaded file |
post_max_size | Maximum size of POST data |
display_errors | Show PHP errors in the browser (turn off on live websites) |
error_reporting | Which error levels are reported |
date.timezone | PHP's default timezone |
session.gc_maxlifetime | Idle time (seconds) before a session is deleted |
disable_functions | PHP functions disabled for security reasons |
opcache.enable | Enable OPcache |
opcache.memory_consumption | Memory allocated to OPcache |
opcache.interned_strings_buffer | Memory for shared (interned) strings |
opcache.max_accelerated_files | Maximum number of PHP files OPcache stores |
opcache.validate_timestamps | Check for code changes to refresh the cache |
opcache.save_comments | Keep comments in the cache (some frameworks need this) |
Other buttons:
- Refresh: reload the values currently applied on the server.
- php.ini: view the full configuration file.
Advanced
PHP-FPM pools per user
Each system user has its own PHP-FPM pool for every PHP version, running with that user's permissions. This way one user's websites cannot read another user's files, and a problem in one pool does not affect the others. For example: 2 users × 2 PHP versions = 4 pools.
Pool and socket names (replace 8.3 with the PHP version):
| User | Pool file | Socket |
|---|---|---|
flashpanel (default) | /etc/php/8.3/fpm/pool.d/www.conf | /run/php/php8.3-fpm.sock |
Another user, e.g. abc | /etc/php/8.3/fpm/pool.d/www-abc.conf | /run/php/php8.3-fpm-abc.sock |
You need the socket name when writing web server configuration yourself, for example to use a different PHP version for a subfolder.
Install PHPRedis with igbinary, zstd, and lz4
WARNING
Not applicable to servers running OpenLiteSpeed.
If several websites (especially WordPress, WooCommerce) share one Redis instance, enabling compression saves Redis memory. Example with PHP 8.3 (which is also the default PHP CLI version):
On the Applications page >
Installed, clickPHP Extensions(puzzle icon) on the PHP 8.3 row and install thephp8.3-redis,php8.3-igbinary, andphp8.3-lz4extensions.Open the server terminal as root and run:
bashapt update && apt install -y liblz4-dev libzstd-dev pecl uninstall redis pecl install --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"' redisYou can ignore an error about
php_iniif it appears.Check with
php -ri redis. The installation succeeded if the output contains:Available serializers => php, json, igbinary Available compression => zstd, lz4Restart PHP 8.3 on the Applications page.
Cannot install PHP on Ubuntu 20.04
Installing a PHP version on an Ubuntu 20.04 server fails with Unable to locate package php8.3 or with the message Failed to install PHP 8.3 on Ubuntu 20.04 (focal).
Ubuntu 20.04 reached the end of its standard support in May 2025, and the PHP repository FlashPanel installs from (ppa:ondrej/php) no longer publishes packages for it. PHP versions already installed keep working but no longer receive updates, and you cannot install new ones. Only PHP 7.4 still installs, because it comes from Ubuntu's own repository.
- Recommended: create a new server on Ubuntu 22.04 or later, then move your websites there with Clone Website.
- Do not set up new servers on Ubuntu 20.04.