How to change PHP version on Business servers

This guide will show you how to manage PHP settings on our Business servers (Stellar Business and old Business SSD plans).
 
For managing PHP settings on Shared servers (Stellar, Stellar Plus plans and old Value, Professional, Ultimate plans), please check this article.


Our Business servers are running with FCGI module and have PHP 5.2 - 5.6, 7.0 - 7.4, 8.0 and 8.1 versions available. To change the PHP version for your domains, follow these steps:

 

 
 
How to manage PHP settings using the PHP Tweaks plugin

 



For cPanel Basic Theme:

 

1. Log into your cPanel.
 

2. Go to the Exclusive for Wvphost 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 Loaders and Caches sections allow you to choose the PHP loader for your scripts and the PHP accelerator for caching the compiled bytecode of your PHP scripts.



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

 
PHP extensions enabled via PHP Tweaks are active for scripts processed by a web-server. In case you encounter any PHP related issues when you are working via a command line or installing scripts through Softacuous, please contact our Support team for further assistance.
 
NOTE: There are the following modules conflicts:
  • nd_mysql conflicts with mysql;
  • nd_mysqli conflicts with mysqli;
  • nd_pdo_mysql conflicts with pdo_mysql;
  • gmagick conflicts with imagick.


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

 



For cPanel Retro Theme:

 

1. Log into your cPanel.
 
2. Go to the Exclusive for Wvphost 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 Loaders and Caches sections allow you to choose the PHP loader for your scripts and PHP accelerator for caching the compiled bytecode of your PHP scripts.



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

 
PHP extensions enabled via PHP Tweaks are active for scripts processed by a web-server. In case you encounter any PHP related issues when you are working via a command line or installing scripts through Softacuous, please contact our Support team for further assistance.

NOTE: There are the following modules conflicts:
  • nd_mysql conflicts with mysql;
  • nd_mysqli conflicts with mysqli;
  • nd_pdo_mysql conflicts with pdo_mysql;
  • gmagick conflicts with imagick.

4. Should you need to reset PHP configuration you currently have, select the domain name and hit Reset Extensions. That will revert all the changes and roll your PHP settings for the domain in question back to the default 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:
 
For cPanel Basic Theme:


 
For cPanel Retro Theme:

 

Navigate to the /home/cPanel_user directory:



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



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



NOTE: If you need to change the memory_limit for an addon domain, you should go to the /home/cPanel_user/.system-php/conf/AddonSubdomain directory. In this case, "AddonSubdomain" is the subdomain that was created while adding the addon domain to the hosting account. The subdomain can be checked in the Domains or Addon Domains cPanel menu.

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 here.

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



For cPanel Retro Theme:

 
Make sure that you enabled the Show Hidden Files (dotfiles) option in the 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:



NOTE: If you need to edit the php.ini file for an addon domain, you should also select the PHP version you have for the addon domain and navigate to the addon's subdomain directory. It is the subdomain that was created while adding the addon domain to the hosting account. The subdomain can be checked in the Domains or Addon Domains cPanel menu. In this case, the full path will look like  /home/cPanel_user/.system-php/ini/5.6/AddonSubdomain.

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:



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!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

SQL

SQL (can be pronounced either as see-kwell or as separate letters) is an abbreviation for...

Web server

Web server  is a software application that is responsible for returning webpages per clients’...

TCP/IP

TCP/IP - Transmission Control Protocol/Internet Protocol (currently in revision 4, known as IPv4,...

IP address

IP address  - Internet Protocol Address – also known as an “IP number” or simply an “IP” is a...

Why is it beneficial to have a dedicated IP address?

When it comes to hosting a website on a shared server, there is always quite a common...