How to add custom PHP version to your VPS/Dedicated Server

As you may know the ntPHPselector in your VPS/DS’ cPanel comes with predefined php v5.3.x, v5.4.x and v5.5.x and if you wish to change the predefined php version to a custom one, you can do the following:

  • The first step is to log in as a root user to your VPS/DS machine
  • The ntPHPselector keeps the php binary files in the following location /opt/ntphp/
  • You will see there 3 folders: php53, php54, php55
  • Let’s say we want to change the default php v5.5.16 to php v5.5.20
  • Rename the php55 folder by executing the following command:

mv /opt/ntphp/php55 /opt/ntphp/php55_old

  • The next step is to upload on the server the desired custom PHP version from their official website php.net/releases
  • Let’s say the download file is in ~/php-5.5.20.tar.gz, extract it using: tar zxf php-5.5.20.tar.gz
  • Afterwards, navigate to the extracted folder: cd ~/php-5.5.20
  • Execute the following command:
    • ./configure –prefix=/opt/ntphp/php55
    • make
    • make install
  • This will install the uploaded custom PHP version in the specified folder
  • Now proceed to your cPanel -> ntPHPselector and change the PHP version to 5.5. *(this will vary depending on the version you have modified)
  • That is it, you should have the custom PHP version running on your VPS/DS

You can verify which PHP version you are running with by creating a phpinfo file.

  • 0 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

CentOS Web Panel Installation – Step by step Guide

In this article, we will show you how to make a working CentOS Web Panel Installation. To avoid...

CentOS Web Panel Review – Introduction

  CentOS Web Panel is a hosting control panel which centers around easy and quick management...

Install PHP Libraries on a CentOS

There are several ways to install PHP Libraries that your installation can utilize on a VPS or...

Install Python’s PIP on a CentOS Server

PIP is Python’s Package Manager, with it you can easily install libraries and additional Python...

Install Python’s PIP on a Debian Server

If you’re using a Debian server that’s hosting a Python application you might need to have...