How to change php.ini Options on all PHP Versions of CloudLinux cPanel
If you wish to apply a php.ini variable to all PHP versions running inside Cloudlinux CageFS (that’s just how php runs alongside your native version).
You need to edit the following file:-
# nano /etc/cl.selector/global_php.ini
An example would be the Woocommerce/Wordpress “max_input_vars”, which recommends it to be above 1700, otherwise very large menus will get cut off, say for example if you have all your blog categories listed inside a menu, when you click Save from within WordPress it will trim to the max variables amount if over it, which results in the menu losing information.
; This file provides global settings for php.ini of all alt-php packages ; The structure of this file: ; option = value ; To confirm changes please run: ; /usr/sbin/cagefsctl --setup-cl-selector [Global PHP Settings] max_input_vars = 2500
Once done, excute this command:
#/usr/sbin/cagefsctl --setup-cl-selector #service httpd restart (optional)