Upgrading PHP On Your Dedicated Server

Before upgrading PHP on your VPS or Dedicated Server, you need to make sure that all applications and websites are compatible with the version of PHP you are switching to.

Next, take a backup of all your websites and apps, then follow the given steps.

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage
  5. Open WHM

The easiest way to upgrade PHP is through EasyApace which you can find in the software section of WHM:

  1. Lookup for EasyApache using the search box on the left section of WHM
  2. Click to open it then click EasyApache (ApacheUpdate) option
  3. This will open the present time Apache Configuration Profile
  4. Click the gear icon for a customized profile option
  5. Apache version screen will appear
  6. Select the Apache version you want
  7. Click on the next step button
  8. A screen will appear where you can select the PHP version
  9. Select the PHP version and click the next step button
  10. Follow the next two steps to save, build, and upgrade

The directories you must know:

Directory for the specific references to the PHP directory or extensions:

/usr/local/cpanel/3rdparty/php/version-number/

Directory for the specific references to PHP libraries or extensions:

/usr/local/cpanel/3rdparty/php/version-number/lib

Directory for the specific references to PHP binaries:

/usr/local/cpanel/3rdparty/php/version-number/bin/

Every version of PHP has its own php.ini file which is found in:

/usr/local/cpanel/3rdparty/php/version-number/etc

Every time you edit this file, the changes are not transferred to other PHP versions you upgrade to or switch to. Hence, after an upgrade, you also need to change your php.ini file to match it with your newer version of PHP.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.