Recently I have been using Digital Ocean, they provide simple, quick, secure, and easy to setup servers which are perfect for hosting Laravel projects. They use SSD drives, take less than a minute to create, and cost as little as $5 a month, pretty nice!
I also recently discovered Server Pilot, a *really* easy way to manage your new server. With one line of code in terminal it sets up the server ready for use. It installs ngnix + Apache (yes, both at the same time), deals with security, then makes virtual hosts, ssl certificates and mysql (including security) as easy as 1 click.
Rocketeer is a deploy script, used for deploying php code simply, it integrates with Laravel nicely too.
Laravel is my MVC framework of choice, and here’s how I get it running on Digital Ocean using Server Pilot and Rocketeer.
In this post we’ll be
- Creating a Laravel project on your local machine
- Uploading that to Github or Bitbucket (I’ll be using Bitbucket)
- Creating a server on Digital Ocean
- Using Server Pilot to setup the server for our needs
- Logging into the server to confirm a few basics
- Using Rocketeer to deploy our code to the server
This guide assumes you can use git, and you have accounts with the following sites:
It also assumes you have Git, Composer, and PHP installed locally.
Right, lets get stuck in!