Upgrade PHP For Magento 2.0 Installation
Magento 2.0 Community Edition (CE) Prerequisites:
Apache version: 2.2 or 2.4
PHP verson: 5.5.22 or later (7.0.2–7.0.4 supported by Magento version 2.0.1 and later only)
PHP Extensions: curl, gd OR ImageMagick 6.3.7 (or later), intl, mbstring, mcrypt, mhash, opcache (not required; highly recommended), openssl, PDO/MySQL, SimpleXML, soap, xml, xsl, zip, json (PHP 7 only), iconv (PHP 7 only)
Apache version: 2.2.24
PHP version: 5.3.27
Hosting: Inmotion Hosting VPS Server
Magento Software: 126.96.36.199
In this case scenario we have PHP version 5.3.27 installed so we will need to upgrade our VPS server’s version of PHP using EasyApache to PHP version 5.5.22 or later. We located InMotion Hosting’s Upgrade PHP using EasyApache support center article to assist us. We have also included our steps below for additional support in upgrading PHP to meet Magento 2.0’s prerequisites prior to installation.
Step 1: Login to WHM (WebHost Manager) as a root user. For help on obtaining root access see InMotion Hosting’s Root Access and How To Obtain It support center article.
You can access your WHM login screen by yourdomain.com/whm (i.e. linderobrands.com/whm).
Step 2: If the Feature Showcase screen appears click “Exit to WHM”.
Step 3: Type in the word “easy” in the WHM search box. In this instance both EasyApache 3 and EasyApache 4 appear. After clicking “Easy Apache 4” we are informed that EasyApache 4 is not available when EasyApache 3 is active.
Step 4: Click on EasyApache(active). In our case that would be EasyApache 3.
Step 5: Under the “cPanel Recommended Profiles” section select the “Basic Apache 2.2” profile.
Step 6: Click on the “Customize Profile” icon located under the “Actions” column for the “Basic Apache 2.2” profile that is currently selected. In our instance we are informed our profile has Apache 2.2.31 chosen to build and our currently running apache is Apache 2.2.24.
Step 7: Click on “Next Step”.
Step 8: Select PHP verison 5.5.22 or later (note: 7.0.2–7.0.4 supported by Magento version 2.0.1 and later only). In our instance we selected PHP version “5.6.20”.
Step 9: Click on “Next Step”.
Step 10: Scroll down and click on “Exhaustive Options List”.
Step 11: Scroll down to the PHP extensions section. Make sure all available extensions are selected according to Magento’s 2.0 prerequisites. In our instance we added the extensions mbstring, opcache (not required; highly recommended), SOAP, and zip to the build. The extensions mhash, simplexml, and xml were not available for selection so we disregarded these two extensions for the build and still met all extension requirements during our Magento Prerequiste Check on install. See our blog post “Magento 2.0 Required PHP Extensions” for additional help.
Step 12: Scroll down to the bottom of the webpage under the “Save selections as custom profile (optional)” section. Add file name with a maximum of 64 letters, numbers, and underscores only.
Step 13: Click on “Save and Build”.
Step 14: Click on “Ok” to confirm action “Recompile Apache and PHP now?”
Step 15: Click on “I Understand” to acknowledge “Termination of the build process will result in data loss…”
Step 16: Once build is complete click on “Close” to close the “Configure Suexec and PHP” screen.
And that completes upgrading PHP along with Apache to meet Magento 2.0’s prerequisites.