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 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?

Схожі статті

CentOS Web Panel Review – Introduction

CentOS Web Panel is a hosting control panel which centres around easy and quick management of the...

How to install FFmpeg on your VPS / Dedicated Server

In this tutorial we will show you how to install FFmpeg on your VPS/dedicated server running on...

How to terminate accounts on my Dedicated Server?

In this article we will show you an easy and efficient way to terminate accounts from your...

How to suspend / unsuspend accounts on my Dedicated Server?

As customers come and go, you might have various reasons to suspend or unsuspend accounts. So,...

Is Microsoft Exchange supported on my Dedicated Server?

All of our servers, including the Dedicated ones, are Linux-based. Microsoft Exchange is a...

Powered by WHMCompleteSolution