• Skip to primary navigation
  • Skip to footer navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WP Fangirl

WordPress Consultant Sallie Goetsch

  • speakerdeck icon
  • Home
  • About
  • Why WordPress?
  • How I Work
  • Portfolio
  • Services
  • Blog
  • Contact

So how much faster IS PHP 7?

December 9, 2015 by Sallie Goetsch 5 Comments

GTMetrix test results with PHP 7 and WP Rocket

Inspired by a recent benchmark test published by Kinsta, I looked up SiteGround’s handy guide to enabling PHP 7. Kinsta’s tests showed that HHVM is faster than PHP 7, but that PHP 7 is still about 3x faster than PHP 5.6.

No, there is not a PHP 6, even though books were published about it. If this kind of thing interests you, you can read why. The TL;DR is that the PHP team messed up PHP 6 so badly they had to scrap it all and start over. I have to wonder if this is also why we went from Windows 8 to Windows 10. (Though I’m using Windows 7 at the time of writing, I’m expecting to upgrade to 10 at some point after I replace my overfull SSD with a bigger one.)

I can get PHP 7 on my SiteGround GoGeek account at no extra charge, but to get HHVM I would need a much more expensive class of hosting. Plus, Jason Cosper’s talk at WordCamp Sacramento suggested that some tests have found PHP 7 to perform better than HHVM. Making this website three times faster sounded good to me.

The first thing to do, as a SiteGround customer, is update the SG Cache plugin to the most recent version, and then disable and re-enable Memcached. I did that both from the plugin end and the control panel end, just to be sure.

SiteGround's cache management panel showing Memcached

Next, I located the PHP Version Manager. It’s in the 1H Software group.

cPanel showing PHP Version Manager

This allowed me to choose the directories I wanted to apply my PHP version changes to. Since I didn’t want to risk breaking everything at once, I just selected the folder for the WP Fangirl site and set it to PHP 7. (Why anyone would want to set their site back to PHP 4.4.9, I have no idea.)

choosing a PHP version in the version manager

Just choose your version and click “Save”–that’s it. In this case, there were no problems. I hadn’t expected there to be, since the site is fairly new and everything is up to date.

Naturally I wanted to know how much faster my site was. I had cleverly run a GTMetrix test on the site while it was still on PHP 5.6, with the following results:

GTMetrix test results for WP Fangirl site on PHP 5.6

And this, mind you, was with caching enabled and after I’d used the WP Performance Score Booster plugin to fix some of the problems that showed up the first time I ran GTMetrix a month or so ago. The thing that brings the score down to a C is not serving scaled images, and I’m hoping that once I create some new image sizes to work with the new responsive images feature in WordPress 4.4, that will improve. What we’re really looking at here, though, is the page load time: 5 seconds. In other words, much too slow.

After I switched to PHP 7, I got the following results:

GTMetrix test results after switching to PHP 7, without making other changes

Page load time definitely improved, though it was not 3 times faster. Still, cutting 1.2 seconds off the page load time with one simple change was definitely worth the brief time it took me to enable PHP 7.

I decided to do a little additional tinkering, and replaced WP Performance Score Booster with WP Rocket. (We now have a developer license for wp Rocket, so I am becoming quite profligate with it.) I had to tinker with the settings a bit, but was able to get page load time down to 3.0 seconds.

GTMetrix test results with PHP 7 and WP Rocket

Yes, for all those who might have been wondering: WP Rocket is compatible with SiteGround’s caching. They even put that in their documentation. And it’s compatible with CloudFlare, too. If you give it your CloudFlare API key, you can clear the CloudFlare cache or set CloudFlare to developer mode from within the WP Rocket settings.

Note that you can’t use WP Rocket along with WP Performance Score Booster. WP Rocket warns you of that when you install it. But the only thing that WP Performance Score Booster does that WP Rocket doesn’t is remove query strings from URLs, and WP Rocket has an explanation for why they don’t do that.

In conclusion: I definitely recommend switching to PHP 7 as long as nothing breaks when you do it. You may not triple your site speed, but there will be observable performance improvements. Oh, and I love the way SiteGround stays on top of new technology.

Related Items

  • There’s a Plugin for That Presentation
  • It’s WordPress Plugin Developer Donation Day!
  • How to Import Joomla Content Using the WP Importer Plugin

Share this post:

Share on Twitter Share on Facebook Share on Pinterest Share on LinkedIn Share on Email

Filed Under: Hosting and Servers Tagged With: CloudFlare, Caching, Performance

Reader Interactions

Comments

  1. Greg says

    January 3, 2016 at 11:05 am

    Page load time is not the same as PHP execution time, you can’t really expect 3x page load even though PHP is running 3x faster.

    Saving 35% page load just with a version change is HUGE. I’d be very happy with that change, congrats.

    Reply
    • Sallie Goetsch says

      January 3, 2016 at 11:21 am

      Thanks for the clarification, and yes, I was happy. Do you know of any tools to measure PHP execution time? Though I’m not sure I want to switch back to PHP 5.6 just to run a test.

      Reply
  2. Azaz says

    April 5, 2016 at 12:08 am

    I saw on this blog post that PHP 7 running on WordPress 4.4.2 has response time of 4ms compared to 1.2s for PHP 5.5. This is quite an improvement over previous versions and much better than HHVM benchmarks. Here is the blog post I was talking about: http://www.cloudways.com/blog/turbocharge-your-cloud-based-application-with-php-7/

    Reply
  3. Sam Valiant says

    May 26, 2016 at 4:31 am

    Is there any changes I might need to make to the themes or is it fairly safe to assume they’ll all work with php7 fine?

    Reply
    • Sallie Goetsch says

      May 26, 2016 at 7:42 am

      It depends on your theme and plugins, Sam. In most cases, if the developers have kept them up to date, they should be fine. But sometimes you’ll run into an error. If your hosting company allows you to change PHP versions easily, you can revert to PHP 5.6 if you run into problems. And of course you should make a backup of your site before you try out PHP 7.

      If you get an error, check to see where it’s coming from and get in touch with the developer of that plugin or theme. S/he may be able to update it for you so you can upgrade to PHP 7 safely.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

What I Write About

  • Book Reviews
  • Content Strategy
  • Design
  • Hosting and Servers
  • Most Valuable Plugins
  • There's a Plugin for That
  • Using WordPress
  • Widgets
  • WordPress Consulting
  • WordPress Events

Series

  • Interviews (5)
  • Checking Up on Your Website (4)
  • Client from Hell (5)
  • WordCamps (17)
  • WP-Tonic Roundtable (30)
  • Modern Tribe Tutorials (13)

Follow Sallie on Twitter

    Sorry, no Tweets were found.

RSS Latest News from the East Bay WordPress Meetup

  • Does It Work? Using The New CSS Layout with Rachel Andrew
    Things change rapidly in the WordPress world. The content in this post is more than a year old and may no longer represent best practices.Description Over the past two years, […] The post Does It Work? Using The New CSS Layout with Rachel Andrew appeared first on East Bay WordPress Meetup.
  • Speaker Training
    Get the workbook and slides for the October 2019 speaker training, plus background and pro tips. The post Speaker Training appeared first on East Bay WordPress Meetup.
  • SEO Audit Template & Resources
    Our November speaker, John Locke, graciously provided a template for an SEO audit report. You can download it as a Microsoft Word or PDF document. The post SEO Audit Template & Resources appeared first on East Bay WordPress Meetup.

Footer

Contact Info

2063 Main St #133 · Oakley, CA 94561

+1 (510) 969-9947

author-izer

sallie [at] wpfangirl [dot] com

Location

Map of East Contra Costa County

I live in Oakley, CA and run a WordPress Meetup in Oakland, CA. Don't confuse them!

Subscribe for New Posts

  • Since I blog on an unpredictable schedule, you might want to subscribe by email. I'll also send out occasional announcements about events.

  • Privacy Policy: I will never sell or rent your contact information.

  • This field is for validation purposes and should be left unchanged.
  • Contact
  • Colophon
  • Comment Policy
  • Privacy Policy
  • Five for the Future

Copyright © 2023 · Utility Pro on Genesis Framework · WordPress · Log in

MENU
  • Home
  • About
  • Why WordPress?
  • How I Work
  • Portfolio
  • Services
  • Blog
  • Contact