302: Upgrade PHP using EasyApache

In this article we'll discuss how you can upgrade your server's version of PHP using the EasyApache script in WHM (Web Host Manager). If you happen to have read our previous article on how to upgrade Apache using EasyApache you'll notice we skipped over the PHP menu, in this article we'll go more in-depth into the available PHP settings you can set within EasyApache.

If you came here from our article on how to pass PCI compliance scans, outdated versions of PHP are a common thing that can cause your website to fail a PCI scan. So understanding how to update PHP on your own using EasyApache in WHM is great knowledge to have in order to help keep your website PCI compliant.

This process would require having root access on your VPS or dedicated server, most users would never need to change this on their own, but the option is available for advanced users.

In most cases you'll be keeping the same version of Apache, so simply click Next Step on the Apache Version page.

In this example we have PHP 5.2.17 installed already, so you'll want to click on PHP 5.3.18, and then click on Next Step.

On the Short Options List page you can set what options PHP will be compiled with. In this guide we are just talking about upgrading PHP, so you can simply scroll to the bottom of the page and click on Save and Build.

A Confirm Action window will pop-up asking if you'd like to Recompile Apache and PHP now? go ahead and click Yes.

Next a Please ackowledge window will pop-up letting you know if the Apache build process is interrupted (you close your web-browser for instance), this could result in data loss. An Apache rebuild in some cases can take upwards of 45 minutes, so it's important to make sure that you'll have access to WHM for the entire duration. Once you understand these implications then click on I Understand.

You should briefly see a build page that lists any errors if they were encountered, then after about 5 seconds it should automatically start the rebuild process and show you the status screen of this happening. The Apache rebuild can take upwards of 45 minutes so please be patient and be sure not to close your web-browser during the process.

After Apache and PHP are compiled a Configure Suexec and PHP window will pop-up, in this case we are simply going to leave the current configuration with our Default PHP Version (.php files) being set to 5, the PHP 5 Handler being set to suphp, and Apache suEXEC being set to on. So you can simply click on Close.

The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.

How did you find this article?

Please tell us how we can improve this article:

Email Address

Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!