We have 2 types of servers : Cloudlinux-cPanel, and cPanel, the method is different for each.
1. For cloudlinux shared hosting (in your cPanel, presence of icon : 'Select PHP version')
In your cPanel, section "Software/Services", you can :
- Change PHP version by "Select PHP Version", here you upgrade/downgrade your PHP version and also personalize it by adding/removing php extensions, and save at bottom. PHP 7 provides significant performance gains over PHP56, so it's important to question yourself and investigate the feasibility...
In general, compatibility is affected only because of 1-2 modules. Check especially 3rd party modules. Contact the module editor for a PHP7 compliant update.
- You can customize your php.ini by clicking at top on "Options" : click on the value of the setting you wish to update and save (see screenshot below).
NB : default php memory limit is set to 1024 MB, please adapt to the value allowed according your offer details. It is recommended to allocate 50% maximum of the total RAM of your plan.
Here what you get by example in your cPanel for PHP version 7 (each PHP version shows different setting possibilities, we can add some on request if possible) :
Classic with prestashop / ex, you need a little higher value for 'max input vars', or max_execution_time... or if you need using putven : simply remove it from list disable_functions
Here is the list of PHP functions disabled by default by security (line disable_functions, just remove the desired one to activate it and save):
posix_setpgid,posix_kill,pcntl_exec,virtual,proc_close,proc_terminate,proc_nice,mail2. For hosting offers under simple cPanel servers (in your cPanel, presence of icon : 'MultiPHP manager')
In your cPanel, you have :- icon MultiPHP manager for choosing php versions per domain basis- icon MultiPHP INI editor to customize your php.ini per domain basis, with 'Basic Mode'
(Check the existing values before using an infos.php file)
Example of possibilities with correct syntax on popular settings with 'Editor Mode' :
display_errors = OffNB :
log_errors = Off
max_execution_time = 1800
max_input_time = 18000
max_input_vars = 50000
memory_limit = 4096M
post_max_size = 128M
upload_max_filesize = 64M
There is no possibility in simple cPanel servers to choose extension php at your level, you must open a ticket and ask what you need.
Thanks to check first existing extensions before using an infos.php file