Back to blog
Tutorials • Aug 10, 2026 • 3 min read

How to Deploy a Laravel Application from GitHub in Minutes

B

Blistra Team

Author

Learn how to connect your GitHub repository to Blistra and deploy your Laravel application automatically with every push. No SSH, no FTP, no headaches.

Why Deploy from GitHub?

Deploying manually — uploading ZIP files, running composer install on the server, clearing caches by hand — gets old fast. By connecting your GitHub repository to Blistra, every git push triggers an automatic deployment. Your code goes live in seconds, and you never have to think about manual uploads again.

Prerequisites

  • A Blistra account (the free plan works fine for testing)
  • A GitHub repository with a working Laravel project
  • Your Laravel app using a supported PHP version (8.2+)

Step 1: Create a New Website

Log in to your Blistra dashboard and navigate to My Websites → Create Website. Choose Laravel as the deployment type. Give your site a name and pick a free subdomain (e.g. myapp.blistra.com) or connect a custom domain.

Blistra will automatically provision the directory structure, set up a MySQL database, and configure the web server to serve your Laravel public/ directory.

Step 2: Connect Your GitHub Repository

In your website settings, scroll to the Deployment Source section and select GitHub. You will see a webhook URL — copy it.

Now go to your GitHub repository:

  1. Click Settings → Webhooks → Add webhook
  2. Paste the webhook URL in the Payload URL field
  3. Set content type to application/json
  4. Choose Just the push event
  5. Click Add webhook

Step 3: Trigger Your First Deployment

Make a small commit and push to your main branch:

git commit --allow-empty -m "Trigger initial deployment"
git push origin main

Within a few seconds, you should see a new deployment appear in your Blistra dashboard under Deployments. The platform will:

  1. Pull the latest code from your GitHub repository
  2. Run composer install --no-dev --optimize-autoloader
  3. Run php artisan migrate --force (if migrations exist)
  4. Clear and cache config, routes, and views
  5. Reload the web server

Step 4: Configure Your Environment

Every Laravel app needs environment variables. In your Blistra dashboard, go to Website Settings → Environment and add your production variables:

APP_ENV=production
APP_DEBUG=false
APP_KEY=base64:your-key-here
DB_DATABASE=your_db
DB_USERNAME=your_user
DB_PASSWORD=your_password

These are injected into the .env file at deployment time, so you never need to commit secrets to your repository.

Step 5: Enable Auto-Deploy (Optional)

With the webhook configured, every push to your main branch will automatically trigger a new deployment. If you prefer manual control, you can disable auto-deploy and trigger deployments from the dashboard with a single click.

Rolling Back

Every successful deployment creates a snapshot. If something goes wrong — a bad migration, a syntax error, a broken dependency — you can roll back to any previous deployment from the Deployments tab. Click Rollback on any previous successful deployment and Blistra will restore that version instantly.

Tips for Production Laravel Apps

  • Use queues: Move slow tasks (emails, API calls, image processing) to queued jobs for faster response times.
  • Cache aggressively: Enable php artisan config:cache, route:cache, and view:cache — Blistra does this automatically during deployment.
  • Optimize Composer: Always use --no-dev in production to skip test dependencies.
  • Set up monitoring: Use Laravel Telescope in development and your logging channel in production to catch errors early.

Conclusion

Deploying Laravel from GitHub with Blistra takes about five minutes to set up and saves you hours over the lifetime of your project. No SSH keys to manage, no deployment scripts to write, no server configuration to maintain. Just push your code and let the platform handle the rest.

Ready to deploy your Laravel app? Create a free account and get started in minutes.

laravel github deployment ci-cd
Share: