How to Limit Available PHP Versions in MultiPHP Manager and Manage php.ini Directives with

This guide explains how to restrict visible PHP versions for cPanel users through MultiPHP Manager and how to manage php.ini directives when PHP‑FPM is enabled. It covers feature lists, packages, domain-level configuration, phpinfo validation, and modifying PHP‑FPM pool settings.

MultiPHP ManagerPHP-FPM DirectivesLimit PHP Versions

~4 min read · Updated Feb 21, 2026

1. Limit Available PHP Versions in MultiPHP Manager


cPanel & WHM allows administrators to restrict which PHP versions appear to users in the MultiPHP Manager interface. This is useful for preventing access to legacy PHP versions or avoiding early upgrades to newer versions.


Important: Users can bypass restrictions by manually setting a PHP version in an .htaccess file. This feature only limits the versions displayed in MultiPHP Manager.


1.1 Requirements


PHP version restrictions require:

  • A Feature List
  • An Account Package
  • Installed PHP versions

By default, all installed PHP versions are visible to all accounts unless restricted.


1.2 How to Set PHP Version Restrictions


  1. Create or edit a Feature List in WHM’s Feature Manager:
    WHM » Home » Packages » Feature Manager

  2. Deselect any PHP versions you want to hide from users.
    Notes:
    • Newly installed PHP versions are visible to all users by default.
    • Restrictions apply to all EasyApache 4 PHP versions, including custom packages.

  3. Create or edit a Package in WHM:
    WHM » Home » Packages » Add a Package
    or
    WHM » Home » Packages » Edit a Package

  4. Assign the Feature List to the Package.

  5. Assign the Package to user accounts in WHM’s Modify an Account interface:
    WHM » Home » Account Functions » Modify an Account

1.3 Limitations


If PHP restrictions are applied, users cannot select restricted versions in MultiPHP Manager. However, administrators can still assign restricted versions manually, allowing users to remain on legacy versions without being able to switch back to them later.




2. Manage php.ini Directives with PHP‑FPM


This section explains how to manage php.ini directives when PHP‑FPM is enabled.


Note: You can edit php.ini directives at both the domain and system level using WHM’s MultiPHP Manager.


2.1 Confirm PHP‑FPM Is Enabled


  1. Log in to WHM as root.
  2. Navigate to:
    WHM » Home » Software » MultiPHP Manager
  3. Locate the domain and ensure the PHP‑FPM toggle is set to On.

PHP‑FPM is enabled by default.


2.2 Create a phpinfo File


Use a phpinfo file to view the domain’s PHP configuration.


  1. SSH into the server as root.
  2. Navigate to the domain’s document root.
  3. Create a file named phpinfo.php with the following content:



Set ownership and permissions:


chmod 0644 /home/username/public_html/phpinfo.php
chown username.username /home/username/public_html/phpinfo.php

Visit:
https://example.com/phpinfo.php
If PHP‑FPM is active, the ServerAPI value will show FPM/FastCGI.


2.3 Review php.ini Directives


You can review directives in:

  • cPanel’s MultiPHP INI Editor (per‑domain)
  • WHM’s MultiPHP INI Editor (global)

Default PHP‑FPM directives include:

php_admin_flag[allow_url_fopen] = on
php_admin_flag[log_errors] = on
php_admin_value[disable_functions] = exec,passthru,shell_exec,system
php_admin_value[doc_root] = "/home/username/public_html"
php_admin_value[error_log] = /home/username/logs/domain_com.php.error.log
php_admin_value[short_open_tag] = on
php_value[error_reporting] = E_ALL & ~E_NOTICE

3. Modify php.ini Directives


3.1 Modify Directives Globally


Use WHM’s MultiPHP INI Editor to modify global php.ini settings.


To modify PHP‑FPM pool settings:

  1. SSH into the server.
  2. Create the directory:
    /var/cpanel/ApachePHPFPM
  3. Create the file:
    /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml
  4. Add directives, for example:

---
php_admin_value_memory_limit: { name: 'php_admin_value[memory_limit]', value: 120M }

Rebuild PHP‑FPM configuration:


/usr/local/cpanel/scripts/php_fpm_config --rebuild

Restart services:


/usr/local/cpanel/scripts/restartsrv_apache_php_fpm
/usr/local/cpanel/scripts/restartsrv_httpd

3.2 Modify Directives for a Single Domain


  1. SSH into the server.
  2. Create the file:
    /var/cpanel/userdata/username/domain.com.php-fpm.yaml
  3. Add directives, for example:

Disable passthru and system:

---
_is_present: 1
php_admin_value_disable_functions: { name: 'php_admin_value[disable_functions]', value: passthru,system }

Enable all functions:

---
_is_present: 1
php_admin_value_disable_functions: { name: 'php_admin_value[disable_functions]', value: none }

Rebuild PHP‑FPM configuration:


/usr/local/cpanel/scripts/php_fpm_config --rebuild

Restart services:


/usr/local/cpanel/scripts/restartsrv_apache_php_fpm
/usr/local/cpanel/scripts/restartsrv_httpd



Conclusion


This guide provides complete instructions for limiting PHP versions in MultiPHP Manager and managing php.ini directives with PHP‑FPM. These tools allow administrators to control PHP availability and fine‑tune performance and security settings across domains.


Written & researched by Dr. Shahin Siami

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue