How to change PHP version on business servers (Stellar Business and old Business SSD plans)

This guide will show you how yo manage PHP settings on our Business servers.

Our business servers are running with FCGI module and have PHP 5.2 - 5.6 and 7.2 versions available. To change the PHP version for your account or a separate addon domain, follow these steps:

for cPanel paper_lantern theme
for cPanel x3 theme



for cPanel paper_lantern theme:
How to manage PHP settings using the PHP Tweaks plugin
How to increase memory_limit
How to work with a php.ini file


How to manage PHP settings using the PHP Tweaks plugin

1. Log into your cPanel.
2. Go to Exclusive for Namecheap Customers section > PHP Tweaks menu:



3. You can select the domain from the corresponding drop-down menu and manage the following group of settings:



PHP version section allows you to check the version which is currently used and set the required one.

NOTE: The list of the available modules varies depending on the PHP version you select.



PHP Loaders and PHP Caches sections allow you to choose the PHP loader for your scripts and PHP accelerator for caching the compiled bytecode of your PHP scripts.

NOTE: Once you enable zend_guard_loader in the PHP Loaders section, all the modules in the PHP Caches section will be enabled automatically.



PHP Others section provides you with the list of additional modules and extensions which can be enabled according to your needs:



NOTE: nd_mysql module conflicts with mysql, nd_mysqli with mysqli, and nd_pdo_mysql with pdo_mysql module.

4. Should you need to reset PHP configuration you currently have, select the domain name and hit Enable default extensions. That will revert all the changes and roll your PHP settings for the domain in question back to the detafault state:





How to increase memory_limit

Note that memory_limit cannot be increased via the PHP Tweaks menu. In order to change its value, follow the steps below:

1. Log into your cPanel account and navigate to Files section > File manager menu:



Navigate to /home/user directory:



Make sure that you enable Show Hidden Files (dotfiles) option in Settings menu:



2. Navigate to the following directory, /home/cpanel_user/.system-php/conf:



3. There you will see the list of the domains hosted in your cPanel account. Move further and enter the folder of the domain you need to increase memory_limit for. By default, there is a single file called php_ver:



This file defines the PHP version set for the domain:



NOTE: If you change the value specified in the php_ver file, your current PHP version will be changed accordingly, the changes will be reflected in the PHP Tweaks menu as well.

4. Now you need to create a new file called memory_limit:



5. Once done, right-click on the file > Edit option:



6. Simply specify the desired value (for example, 128M) and hit Save:





How to work with a php.ini file

Apart from the PHP Tweaks plugin, you may need to alter some of the settings using a php.ini file. One of the most common requests is to increase post_max_size and upload_max_filesize limits which can be done with the help of a php.ini file. Before proceeding, download php.ini for the required PHP version:

           
           PHP 5.2
           PHP 5.3
           PHP 5.4 - 5.6




1. Log into your cPanel account and navigate to Files section > File manager menu:



Make sure that you enable Show Hidden Files (dotfiles) option in Settings menu:



2. Navigate to the following directory, /home/cpanel_user/.system-php/ini:



3. Here you need to select the PHP version you have set for your domain and the domain name itself. Thus, the full destination path will look like /home/cpanel_user/.system-php/ini/5.6/nctests.info:



4. Now you need to upload the php.ini file that corresponds to your current PHP version. Once done, use Extract option:



4. After that, right-click on php.ini.txt to Rename it php.ini. Then, another right click to proceed with Edit option. You can also use Code Edit option if that is more convenient for you:



5. Here you can use Ctrl+F key match for your convenience – it will allow you to find the needed limit or value. In our case, it is upload_max_filesize:



6. Once all the required changes are performed, hit Save.




for cPanel x3 theme:
How to manage PHP settings using the PHP Tweaks plugin
How to increase memory_limit
How to work with a php.ini file


How to manage PHP settings using the PHP Tweaks plugin

1. Log into your cPanel.
2. Go to the Exclusive for Namecheap Customers section > the PHP Tweaks menu:



3. You can select the domain from the corresponding drop-down menu and manage the following group of settings:



The PHP version section allows you to check the version which is currently used and set the required one.

NOTE: The list of the available modules varies depending on the PHP version you select.



The PHP Loaders and PHP Caches sections allow you to choose the PHP loader for your scripts and PHP accelerator for caching the compiled bytecode of your PHP scripts.

NOTE: Once you enable zend_guard_loader in the PHP Loaders section, all the modules in the PHP Caches section will be enabled automatically.



The PHP Others section provides you with the list of additional modules and extensions which can be enabled according to your needs:



NOTE: nd_mysql module conflicts with mysql, nd_mysqli with mysqli, and nd_pdo_mysql with pdo_mysql module.

4. Should you need to reset PHP configuration you currently have, select the domain name and hit Enable default extensions. That will revert all the changes and roll your PHP settings for the domain in question back to the detafault state:






How to increase memory_limit

Note that memory_limit cannot be increased via the PHP Tweaks menu. In order to change its value, follow the steps below:

1. Log into your cPanel account and navigate to the Files section > the File manager menu:



Select the Home Directory option in the pop-up window and make sure you check Show Hidden Files (dotfiles), then hit Go:



2. Navigate to the following directory, /home/cpanel_user/.system-php/conf:



3. There you will see the list of the domains hosted in your cPanel account. Move further and enter the folder of the domain you need to increase memory_limit for. By default, there is a single file called php_ver:



This file defines the PHP version set for the domain:



NOTE: If you change the value specified in the php_ver file, your current PHP version will be changed accordingly, the changes will be reflected in the PHP Tweaks menu as well.

4. Now you need to create a new file called memory_limit:



5. Once done, right-click on the file > the Edit option:



6. Simply specify the desired value (for example, 128M) and hit Save:






How to work with a php.ini file

Apart from the PHP Tweaks plugin, you may need to alter some of the settings using a php.ini file. One of the most common requests is to increase post_max_size and upload_max_filesize limits which can be done with the help of a php.ini file. Before proceeding, download php.ini for the required PHP version:

           
           PHP 5.2
           PHP 5.3
           PHP 5.4 - 5.6




1. Log into your cPanel account and navigate to the Files section > the File manager menu:



Select the Home Directory option in the pop-up window and make sure you check Show Hidden Files (dotfiles), then hit Go:



2. Navigate to the following directory, /home/cpanel_user/.system-php/ini:



3. Here you need to select the PHP version you have set for your domain and the domain name itself. Thus, the full destination path will look like /home/cpanel_user/.system-php/ini/5.6/nctests.info:



4. Now you need to upload the php.ini file that corresponds to your current PHP version. Once done, use the Extract option:



4. After that, right-click on php.ini.txt to Rename it php.ini. Then, another right click to proceed with the Edit option. You can also use the Code Edit option if that is more convenient for you:



5. Here you can use Ctrl+F key match for your convenience - it will allow you to find the needed limit or value. In our case, it is upload_max_filesize:



6. Once all the required changes are performed, hit Save.


That's it!

Need any help? Contact our HelpDesk

Comments

We welcome your comments, questions, corrections and additional information relating to this article. Your comments may take some time to appear. Please be aware that off-topic comments will be deleted.

If you need specific help with your account, feel free to contact our Support Team. Thank you.

Need help? We're always here for you.

× Close