Changing PHP variables on a shared server

Common PHP variables and the PHP version running on a cPanel account can be changed via the "Select PHP Version" tool:

cPanel PHP Selector


Click the "Switch to PHP Options" link:

PHP Selector extensions


A list of the most common PHP variables are listed, click the option you wish to change and select or change the value. Click the Apply button and the Save button at the bottom to apply the changes:

PHP Selector options


Other PHP variables can be manually changed via a .htaccess file in the public_html directory of an account.

A full list of the PHP variables can be found here:


The following is an example of PHP variables being modified via a .htaccess file:

php_value memory_limit 256M
php_value post_max_size 128M
php_value upload_max_filesize 128M


  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How can I change or upgrade my PHP version

On a shared server the PHP version  can be changed easily via the "Select PHP Version" tool, once...

Setting a PHP version per domain/directory on a shared server

You can set a custom PHP version per domain or directory by creating a .htaccess file containing...