Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

carlos_rangel's avatar

Deploy Laravel Apps for free

Do you know if exist a service to deploy Laravel apps fro free?

In the ReactJS world when you want to deploy an app for free you just use Vercel and connect it to your Github account, it's super easy to have your apps deployed to show.

I'm currently unemployed so I want to have some projects to show as portfolio for free.

0 likes
3 replies
LaryAI's avatar
Level 58

Certainly! There are a few options available for deploying Laravel applications for free, although they may come with certain limitations compared to paid services. Here are a few options you can consider:

  1. Heroku: Heroku offers a free tier that you can use to deploy small Laravel applications. It's easy to set up and integrates with Git for deployments. The free tier has some limitations, such as sleeping after 30 minutes of inactivity, but it's a good starting point for a portfolio.

Here's a basic guide to deploying a Laravel app on Heroku:

  • Create a Heroku account and install the Heroku CLI.
  • Navigate to your Laravel project directory and initialize a Git repository if you haven't already.
  • Create a Procfile in your project root with the following content to tell Heroku how to start your application:
    web: vendor/bin/heroku-php-apache2 public/
    
  • Add and commit your changes to Git.
  • Create a new Heroku app with heroku create.
  • Add the Heroku remote to your Git repository with heroku git:remote -a your-app-name.
  • Set your app's environment variables on Heroku, such as your APP_KEY.
  • Deploy your application with git push heroku master.
  1. GitHub Pages with a Static Site Generator: While GitHub Pages doesn't support PHP applications directly, you can use a static site generator to convert your Laravel application into a static site if it doesn't require server-side processing. Jigsaw is a static site generator for Laravel that you can use for this purpose.

  2. 000WebHost: 000WebHost offers a free hosting service that supports PHP and MySQL, which you can use to deploy Laravel applications. However, be aware that the free tier may include ads and have other limitations.

  3. InfinityFree: InfinityFree is another free hosting provider that supports PHP and MySQL, suitable for small Laravel projects.

  4. Glitch: Glitch is a platform that allows you to write, share, and remix code for applications. It supports PHP and can be used to showcase small Laravel projects.

Remember that free hosting services are often limited in terms of performance, uptime, and features. They are suitable for portfolio projects and small applications, but for a production environment, you might want to consider a paid hosting solution.

Here's a simple example of how you might set up a Laravel project on Heroku:

# Install the Heroku CLI and log in
heroku login

# Navigate to your Laravel project directory
cd path/to/your/laravel/project

# Initialize a Git repository if you haven't already
git init
git add .
git commit -m "Initial commit"

# Create a Heroku app
heroku create

# Create a Procfile in the root of your Laravel project
echo "web: vendor/bin/heroku-php-apache2 public/" > Procfile
git add Procfile
git commit -m "Add Heroku Procfile"

# Set the APP_KEY environment variable
heroku config:set APP_KEY=$(php artisan key:generate --show)

# Deploy your application to Heroku
git push heroku master

Make sure to check the documentation of the service you choose for specific instructions on deploying Laravel applications.

carlos_rangel's avatar

@LaryAI Yeah, but Heroku is not longer free...

I'll check the other option you provide, kind robot šŸ¤–

Please or to participate in this conversation.