Upgrade PHP on a Linux Server

This article will walk customers without a control panel through upgrading PHP using YUM.

  1. Connect to the Linux server via SSH using a program such as Putty.
  2. Configure the YUM repository to look in the correct location for an upgraded PHP RPM. There are many different repositories online that offer upgraded RPMs for PHP so a quick search via Google will be of assistance. For this article we'll be referencing the YUM repositories at webtatic.com
  3. Tell rpm to accept rpm's signed by webtatic
  4. rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy

  5. Add the yum repository information to yum
  6. wget -P /etc/yum.repos.d/ http://repo.webtatic.com/yum/webtatic.repo

  7. Update the existing installation of PHP which will also update all of the other PHP modules installed
  8. yum --enablerepo=webtatic update php

  9. Type Y <enter> and let the process complete.
  10. You can now see your current version of PHP using php –v from the shell prompt.