How to Choose PHP Hosting

I’ve been thinking a lot about the state of hosting in PHP lately, mostly as a result of working with a few different clients on their setups (including one that bought brand new hosting a month ago and got a PHP 5.3.3 platform), and also being at DrupalCon and meeting a community who is about to make a big change to their minimum requirements. With that in mind, here are my thoughts and tips on choosing hosting.

Choosing Hosting

The biggest factor that I look for in a host is which versions of PHP are available. Today, October 2014, the landscape of PHP versions look like this:

  • PHP 6 or 7: this host is lying to you, these do not exist
  • PHP 5.6: current stable
  • PHP 5.5: also stable, supported, and totally acceptable
  • PHP 5.4: security fixes only. Don’t ship a new project onto this platform
  • PHP 5.3 or earlier: unforgivable

No host wants to be running bleeding edge code, it takes time for it to be tested and made available in a way that they want to introduce and support and some of the distros are slow about that. However I don’t understand why any organisation would choose to put production code onto an old platform. Mostly, I think it’s lack of understanding/information – so the hosts offering older versions are not going to make great PHP platform hosts, because they’re not really keeping up with what’s happening there.

My list of questions to ask a potential hosting partner (this is straight from my slide deck at DrupalCon last week):

  • What versions of PHP are available?
  • Are backups included?
  • Which extensions are available, and can I add others?
  • Can I get support with my PHP setup?

The correct answer to the first question is PHP 5.5 or later. The correct answers to the other questions will vary according to your needs, but the host should give the impression that they understand all these questions and why someone might ask them. If not – red flag! Choose someone else, because there are good hosts out there.

Benefits of the Newer Platform

Here’s my dream: everyone gets to use a decent version of PHP. As a community, we are the consumers and we need to stand up for what we believe in. I have a very hobbyist client that I mentioned in the introduction who was sold a PHP 5.3.3 platform when he bought a new VPS last month. That’s lower even than the requirements for password_compat, and frankly I’m really disappointed. This person has worked hard to build a site for his new company, by himself. But he gets an insecure, slow, unsupported platform because we allow those providers to operate.

Adoption rates in PHP currently look something like this:

php-adoption-oct14

Think about that for a moment. The current, supported versions are in green and dark grey (you can’t see the dark grey, it’s too small). The yellow one is PHP 5.4, less than a year of security support remaining.

The vast majority of PHP code does not need the new shiny to run, and to run well. However a newer platform gives significantly better performance, and it’s VERY likely that your code will work there without problems – in fact if you enquire about my consultancy services for PHP migration (which are available for a very reasonable price, of course!) I will usually suggest you give it a whirl by yourself and only pay me if you actually have issues :)

I wrote an earlier post showing the speed improvements in PHP for PHP 5.6 but here are basically the same numbers with 5.2 also included (since so many people still seem to be migrating from there!). The graph shows how long it takes PHP to do a specific set of tasks, on each version of the language.

php-performance

If any paid-for software platform offered you this as a free upgrade with so few backwards compatibility breaks, you’d bite their hands off. Let’s vote with our feet, people.

Unofficial List Of Hosts

This stuff changes all the time, but when I tweeted for recommendations of good hosts offering PHP 5.5 as an option on new platforms, this is what my followers sent back to me:

  • Servergrove are totally PHP-friendly hosts, run by a fantastic PHP developer (hi Pablo!), and were widely recommended.
  • Linode hosts this wordpress blog (and that’s an affiliate link, so you know), and have always been super friendly and helpful.
  • Digital Ocean
  • Siteground
  • Rackspace
  • AWS Cloud

So, if you’re looking for hosting today, then perhaps one of the above will be the place that you find your new digital home?

18 thoughts on “How to Choose PHP Hosting

  1. PHP 5.3.3 isn’t insecure or unsupported when talking about an LTS release, such as what was likely RHEL or CentOS 6. When LTS linux distributions release versions like this, they are researching each and every new CVE that gets reported for the software and patch the security issues.

    RHEL/CentOS 6 will continue to support (i.e. customer support, security and critical bug fixes) PHP 5.3.3 (ironically if using php-fpm its 5.3.18) for a good few years from now (2020 with 3 more years RHEL extended support), probably becoming EOL after php.net EOL’s PHP 7.0.

    • Totally agree that this isn’t exactly the end of the world, but still I think it’s rather lame to be running on platforms that are 5+ years old, and that it’s actually quite difficult to avoid that. It’s holding us all back :(

    • The reason why I mention this is, there are those of us who need new PHP versions to keep up with advances in features and library/application version requirements, and there are those that need to maintain a constant set of existing websites whilst reducing the maintenance costs (e.g. development resources for fixing bugs caused by non-critical bug-fix updates, less frequent migrations to new servers).

      So there’s a case for hosting companies providing new PHP versions, and a case for providing stable PHP versions, and I don’t think either should be ignored. The right balance would allow a company to use what best fits their business need.

      • I think I’m agreeing too much with you today :) But yes, existing and old versions that we might need for something are all good and useful. Old versions by default or not offering new ones is really what I was trying to get at in this post. Maybe I didn’t succeed.

  2. Lorna,

    I recently found Vultr (vultr.com) to be a nice VPS hosting, they’re like Digital Ocean and Linode.

    • Another vote in favor of Vultr, though you’re on your own when it comes to installing PHP et al. In return, you get machines that you can spin up in more locations, live imaging, faster CPUs and better bandwidth. I’ve got a site running on one of their $5 VMs with HHVM 3.2 (was using PHP 5.6, but figured I’d try out the other side of the fence) and it works well.

  3. Hello Lorna,

    Interesting topic, I have tried almost all the hosting you mention and they work great, but for most of them you need to have knowledge of sysadmin. Many of my customers do not have that knowledge. Siteground was a great solution for them for a while.

    I have tested literally hundreds of hosting companies since I do many installations for open classifieds.

    Theres some other things I always recommend to clients to check before they buy hosting:
    – SSD disks
    – cPanel or similar
    – How many domains can host
    – 24/7 support
    – Uses Linux
    – 1 Click Software Install
    – Server locations.

    Here I did a recent list of hosting that I have tried in the last 3 months, with recommended hosting and not recommended.
    http://open-classifieds.com/2014/07/31/open-classifieds-hosting/

    Hope is useful to some of you!

  4. Hey Lorna! Thanks again for including DigitalOcean in this list :)
    For people who comes to this post, if you need any help or have questions about PHP on DigitalOcean, feel free to reach me on Twitter: @erikaheidi.

  5. You forgot to mention fortrabbit.com ;) and heroku.com.
    Beside the PHP version, the deployment workflow and customer support is very important to developers and businesses.

  6. Pingback: A Simple Workflow From Development To Deployment | Website Design Noosa

  7. Pingback: A Simple Workflow From Development To Deployment - Daniele Milana

  8. Pingback: A Simple Workflow From Development To Deployment - Webnesday

  9. Hi Lorna,

    The article is getting a little bit dated but the topic is still up to date :) At least for those that have to select a PHP version. I was reading a lot and found The Advantages of PHP Friendly Hosting interesting as well.

    What PHP version would you you recommend today?

    Regards
    Paula

    • Hi Paula! Today you should be shipping on PHP 7.0 – most older projects will work fine on PHP 7 or need only minor modifications. The bad old days of a PHP upgrade breaking everything are far behind us as long as you’re coming from a version of PHP released in the last 5 or 6 years.

  10. While AWS and DO are a great choice for hosting, it is not recommended for everyone. This is because you need to have Linux skills if you want to work on these infrastructures. Otherwise, you can use PHP web hosting providers, like Cloudways (https://www.cloudways.com/en/php-cloud-hosting.php ), that provides you a platform to host your app on these infrastructures. Have you tried this platform. I would recommend it because of the support and ease it offers.

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

This site uses Akismet to reduce spam. Learn how your comment data is processed.