45
PHP in the Cloud ☁
Just the Gist
There are now many cloud services on offer. From the highly configurable to the framework-specific. PHP can take advantage of these solutions in their varied forms. Depending on how much configuration you need, there is a cloud solution for you.
Most of all the hosting services offer a plan where PHP is included. This has made it easy for many website owners to choose PHP for their website. They have not had to worry about the installation of PHP, or the configuration of their website, or even the setup of a custom server. Services such as BlueHost, HostGator and Hostinger all offer PHP hosting, there's also one-click WordPress installers. These services are great for individuals who want to start their own website, but also for those businesses who don't want to configure or maintain their own servers. But this is how it has been for a long time. With the advent of cloud hosting services, it has become easier to get tailored solutions that can scale with the business. What services does exist that offer PHP in the cloud?
A major player in this space is AWS EC2. It's highly configurable, even at a point where other cloud services can be built upon it. This service lets you choose CPU, GPU, memory and storage. It can be either on-demand or dedicated servers. Also, EC2 is definitely not the only cloud service that AWS offers, but it's probably the one you want to go for when you wan to host a PHP application.
A couple of other services for hosting web applications are Linode and DigitalOcean. Linode essentially offers a Linux computer. It's up to their customers to configure this however they want. This means that if you want to use PHP 8.1 and keep updating with the latest release as soon as it is ready, that is entirely up to you. This kind of service is not unique for Linode however. Many hosting services has seen the benefit of virtual private servers (VPS) and has included this in their product offerings. A major competitor to Linode is DigitalOcean. While their "Droplets" can be seen as implementation VPS, they market it as a more scalable solution.
Another service is Heroku. This one is less about server configuration and more about the requirements of the application. You can attach services such as datastores and search services as addons. Compared to the earlier Heroku's service is a less configurable but easier to use.
And finally, our favorite frameworks have their own cloud services. Laravel offers a serverless service in the cloud with their Laravel Vapor. Symfony has their Symfony Cloud Platform As A Service (PaaS). Even smaller PHP frameworks has a cloud solution, such as Silverstripe Cloud.
A lot is happening with cloud services. Have you used anyone of these mentioned? Did I leave anyone out that you want to highlight? Do you see any preference for a framework specific solution to a general-purpose one? Have you found a great tutorial on this subject, what was it? Comment below and let us know what you think ✍
- AWS SDK for PHP - https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html
- PHP on Heroku - https://devcenter.heroku.com/articles/getting-started-with-php
- Laravel Vapor - https://vapor.laravel.com/
- Symfony Cloud - https://symfony.com/cloud/
45