If you’re running WHM / cPanel Server chances are your PHP Version is 5.5 or older. Updating to PHP 7 has many new features that you’re sure to love and the speed increase is fantastic.
PHP 5.5 is already at it’s end of it’s life-cycle. PHP 5.6 is nearing it’s life-cycle and is scheduled to expire in January 2018. Upgrading is important to ensure best server reliability and security.
I’m a firm believer in keeping up with tech, and came across this tweet yesterday from Joost DeValk of Yoast, whose article convinced me to upgrade this server to PHP 7.
As of today, Yoast SEO will be urging people with websites running on PHP 5.2 to upgrade their PHP version. https://t.co/eMoveHeAzb
— Yoast (@yoast) March 21, 2017
Running WordPress and curious what version of PHP your site is running on? This plugin makes sure your WordPress install, plugins and themes, are compatible with newer php versions, including PHP 7.
If you have managed web hosting, about the only option available to you is contacting your hosting provider.
We chose unmanaged / self-managed VPS server hosting, and let CloudFlare provide it’s free CDN and Encryption . We are responsible for administration and upgrading / patching our instance. This saves a ton of money each month!
On to our PHP update process. This is for WHM / cPanel systems only.
First step is to Backup Your Server fully. If your web host offers a snapshot feature, be sure to take one before beginning this upgrade!
cPanel uses Easy Apache to handle it’s php operations. Chances are if your server is running an old php version, it is running under Easy Apache 3 (EA3.) Upgrading your php version will require migrating Easy Apache 3 to Easy Apache 4 (EA4.)
Sign into WHM and type ‘easy’ into the search box. You will see both Easy Apache versions. Click on EA4. You will be prompted to migrate from EA3 to EA4. Check this cPanel support website link for more details.
When the migration process is complete reboot your server.
Next go to EA4 configuration and select Run System Update. After that select all packages customize option. Be sure PHP 7 is enabled and other preferences. Next click provision to install the package you selected.
If you are running under CloudFlare we recommend enabling Mod_CloudFlare to convert their proxy IP’s to true visitor IP’s. More on that at the bottom of this article.
Your domains and any installed subdomains are not yet running PHP 7. This prevents a website breaking under newer php versions.
It’s easy to enable other php versions including 7 by typing ‘php’ in WHM’s search box. Select MultiPHP Manager. Here you can change php versions on a domain / subdomain basis.
All our domains running WordPress handle PHP7 great with no issues whatsoever. Another running phpBB 3.2 (current) does not. Running it under 5.6 until an upgrade or patch is available.
As mentioned above, if your running CloudFlare we recommend installing Mod_CloudFlare in Easy Apache 4. This eliminates the need for CloudFlare’s troublesome WordPress plugin, and restores visitors true IP addresses.
Update 10/04/18: Here is a working Mod_Cloudflare installation script for EA4.
Install Mod_CloudFlare by following the instructions on it’s GitHub page. Next go back to EA4 and select customize. Check the Mod_CloudFlare option save and provision. Reboot WHM and you’re done..
If You’re serious about your website or blog, and want to improve the sites SEO and article readability, subscribe to @Yoast on Twitter . Great info!
Have questions? Comment below.. 😉