I’ve tried a few different services to manage servers in the past, such as Command.io and I’ve settled on Laravel’s Forge for its ease of use, low cost and quick responses to any Support tickets, when building or maintaining servers for clients or side projects.
Forge can be used to create a server, designed for PHP development on your choice of provider, whether its Digital Ocean, AWS or a custom provider.
It will install nginx, PHP 7 (or 5.6), mySQL, postgres and Redis, possibly faster than using Ansible and definitely faster that doing it yourself by SSH’ing in.
Its not specific to Laravel based projects, it can be used to create servers to host any kind of PHP application. I’ve used it to host Laravel, Lumem, Slim native PHP and even WordPress sites. This blog is hosted on Digital Ocean via Forge.
You pay a flat fee to Forge for its control panel, regardless of the number of servers and the costs of any servers you create are invoiced as normal from your provider, such as AWS.
For me, the benefits of Forge are:
- Very quick to create a new PHP-ready server on Digital Ocean or AWS
- Adding sites will create the nginx virtual hosts automatically, including automatic www to non-www redirects.
- Forge also now supports Lets Encrypt so it only takes 1 or 2 clicks to add SSL to your site.
- You can add ‘apps’ to your sites which connect Github to your server, so when you commit to your project it can auto deploy to the server.
There are plenty of other features and a good place to see them if you like video tutorials about Forge in action are on Laracasts.
Some small complaints I have about Forge are that it doesn’t support roll-backs of deployments to a server, but I think maybe that’s saved for Laravel Envoyer, which I haven’t tried out yet.
Also, when adding a new site, such as “domain.com”, it will also create the www version nginx virtual host for you of “www.domain.com”, the problem is that if you add a site of “www.domain.com”, it goes ahead and creates a virtual host of “www.www.domain.com”
My next step it to try out PHP 7 on a Forge-built server.