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.

  1. Log into WHM.
  2. In the Find box at the top-left, type in Easy, then click on EasyApache.
    whm-click-on-easyapache
  3. Leave the Previously Saved Config (** DEFAULT **) option selected, and click on Start customizing based on profile.
    whm-click-on-start-customizing
  4. In most cases you'll be keeping the same version of Apache, so simply click Next Step on the Apache Version page.
    whm-click-on-apache-next-step

  5. 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.
    whm-click-on-php-5-3-18whm-click-on-php-next-step
  6. 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.
  7. Confirm Action window will pop-up asking if you'd like to Recompile Apache and PHP now? go ahead and click Yes.
    whm-click-recompile-apache-php-yes
  8. 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.
    whm-click-i-understand
  9. 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.
    whm-easyapache-build-progress
  10. 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.
    whm-click-on-configure-suexec-close
  11. PHP should now be upgraded on your server, the easiest way to confirm this update is by creating a phpinfo(); info page to see PHP settings.
  12. When you view your phpinfo(); page you should now notice the PHP version is stating 5.3.18 which is what we selected to upgrade to, and your build date should reflect today's date.
    phpinfo-page-after-upgrade

You should now understand how to upgrade your PHP version on your server utilizing EasyApache within WHM.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
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 our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2004
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5279

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!