How to change PHP versions & settings in cPanel Linux?
Our best in class servers provide our customers the option to run different versions to how to change and view PHP version and setting in PHP (5.4,5.5, 5.6,7.0,7.1) on their hosting account using cPanel. This is much needed while using third party applications and software, which may need the most recent version of PHP. The PHP version can be changed easily on shared servers. This option is available in all Linux Shared hosting plans and by default PHP 5.3 is enabled on Linux cpanel hosting.
Changing the PHP Version:
As we discussed above HostingRaja servers support multiple versions of PHP. In order to change the PHP version, follow below mentioned steps:
- Log in to cPanel.
- In the Software segment of the cPanel main window, hit Select PHP Version option:
- Once you hit the select PHP version option cPanel shows the current version of PHP. If you want to change the version of PHP, in the PHP version list, look for the version you want to change to and select it and then hit set as current:
The version you updated to takes effect immediately.
Changing PHP Setting in cPanel
Using cPanel you can change various PHP setting easily. You can enable or disable file upload, as well as you can perform configuration related tasks like display_errors, include_path, log_errors, memory_limit and many more.
To change the PHP settings from cPanel, follow these steps:
Log in to cPanel account.
- From the main screen of cPanel, search for software area, click select PHP version:
- Click Switch To PHP Options:
- On this step you can change the setting based on your needs:
- Once you are done, click save button.
If you find any difficulty in changing PHP settings feel free to contact our support team, we will do it for you.
Choosing the PHP Version in cPanel Host Services
Know more about PHP version
PHP is a general-purpose scripting language that's particularly suited to server-side web development, in most case PHP generally runs on a web server. Any PHP code in a requested file is executed based on the PHP runtime, typically to create a dynamic website content or dynamic pictures used on websites or elsewhere.
The PHP software works with the web server. It is the software that delivers web content to the globe. When you request a file, the web server happens to be running PHP, and it sends HTML back to the browser.
Basic information ablout cPanel PHP?
cPanel is a web-based control panel tool which will help you to assist to manage your web hosting account through a web interface rather than a console. With the help of best cPanel hosting, you will be able to accomplish your tasks quickly and even non-professional. It will simply set the websites through cPanel hosting.
Steps to Change the PHP Version in a cpanel:
Step-1: Login to cpanel
Step-2: Click on Select PHP Version in software section
Step-3: In the PHP Selector/Extension page:
==>Click the PHP version drop-down menu button and select the required version
==>And click on Set As Current
==>You can also select additional features and click on the Save button
Step-4: You can switch to PHP options for more features
==>You will find the PHP Selector/options page like mentioned in the below screenshot.
==>You can make any changes in the option provided based on your requirements and click on Save button.
HR panel provides a module named PHP Version where you can change versions which is suitable for a domain present in a particular account.Default PHP version is PHP 5.6 under VPS, Cloud or Dedicated server.If you can't get something to work and think it might be because you have the wrong version of PHP, there is a really simple way to check the current version. create a file and Just put the single line of code in a PHP file.
run it on your server to get all the PHP information you need.
Different versions of PHP may have different default settings, and in the case of newer versions, might have new functions.The newer versions have huge performance improvements, great features, and better security.Latest PHP version is PHP 7 and it is a major upgrade compared to the last stable version of the language, PHP 5.6. Although upgrading your code from PHP 5.6 to PHP 7 involves carefully checking for incompatibilities, both in your code and in any libraries on which your code depends on, the benefits of upgrading to PHP 7 make the effort very worthwhile. PHP 7 performs much faster than PHP 5.6, which allows sites that use the new version of the language to offer much better service to their users.
Before Upgrading PHP versions remember these points:
1. First, you need to make sure that any libraries that your PHP project uses are available for PHP 7. If the libraries do not yet support PHP 7, you may have to hold off on upgrading for a while, or see if it is possible to remove dependence on those libraries.
2. If your code is written in PHP 5.5 or PHP 5.6, then upgrading will likely be straightforward. However, if you use PHP 4, then there are some syntax changes that you should be aware of. For example, the old style of constructor functions employed in PHP 4 is not supported in PHP 7, even though these constructors worked in PHP 5.
3. When upgrading to PHP 7, it is best to ensure that your code includes tests, such as unit and integration tests. These tests should catch any issues with your application before they show up as bugs in a live environment.
Steps to Upgrade PHP Version:
Step1: Login to server as a root user and run the below 2 commands:
It will take around 1 hour for PHP multiple versions installation. Once it is done login to HR Panel and Go to PHP version where you can see the Versions under drop-down menu. You can select the appropriate versions for your projects.