The final step in this section is to actually show something to the client, so we need to deploy our project somewhere online.
At this point, we don't need a domain name, the goal is to allow the client to see the progress and click around.
Where/How We Will Deploy
We will deploy our project on a new AWS EC2 server instance, created via Laravel Forge.
Why AWS? For this specific course, I chose AWS over Digital Ocean or other providers, because it's the most useful in practice: AWS is a required skill in many Laravel job descriptions, so it would be beneficial for you to learn how to use it.
Why Laravel Forge? This one is debatable, but Forge is one of the fastest way to get from zero to a working server, without ever touching Terminal. If you want to save some money and have more time, you can build a server manually and configure it for Laravel projects, we have a separate course Deploy Laravel Project to AWS EC2: Step-By-Step
Notice: at the time of writing this, Laravel Cloud isn't officially released yet. Maybe will need to rewrite this in 2025.
Deployment: Create Server
To start, you need to create an account on AWS and on Laravel Forge, both will require credit cards. Unfortunately, there's no free option here.
On Laravel Forge, you need to add your AWS credentials, and then press Create Server
. Select AWS in the list:
In here, we need to configure our server information: the most important things are:
- Name: so you would recognize it later in the list
-
Server Size:
t3.small
is fine, at the moment price is $0.0208/hour, which is around $15/month. You may try a smaller size but with risk that it may not have enough resources.
Press Create Server
. Then a Pop-Up will open up with Server Credentials
. Save them somewhere safe!
After that, your server should be preparing:
Wait until this process is completed. You'll know as soon as you will see this page:
Creating a (Web)Site from GitHub on New Server
From here, for our testing purposes - we will click on...