Back to Blog

How to Deploy a PHP App for Free (Laravel, Symfony & Plain PHP)

Kumar Saha
August 18, 2026
6 min read

PHP hosting still means cPanel and FTP for far too many people. It doesn't have to. This guide deploys a modern PHP app — Laravel, Symfony, or plain PHP — straight from a Git push to a live HTTPS URL, for free, with composer handled for you.

What you need

  • A PHP app in a GitHub, GitLab or Bitbucket repository
  • A composer.json (for Laravel/Symfony) at the repo root
  • An Abasthan account (the first app is free — no card required)

Step 1: Make sure your app serves on the right port

For framework apps this is handled by the start command; for plain PHP, serve the public directory and honour the PORT the platform provides:

php -S 0.0.0.0:$PORT -t public

Laravel serves with php artisan serve --host=0.0.0.0 --port=$PORT, and Symfony runs the same way — the platform sets the start command for you when it detects the framework.

Step 2: Connect your repository

In the Abasthan dashboard, choose Create App → Web Service and connect your Git provider. Pick the repo and branch; the platform detects PHP, runs composer install, and picks a runtime (PHP 8.1, 8.2 or 8.3). More detail on the PHP deployment page and in the deploy PHP docs.

Step 3: Choose the Free plan

Pick the Free instance. Your first app is $0 — a real deployment, not a 14-day trial. When you need more, plans move to per-second billing so you only pay for runtime you use.

Step 4: Deploy

Deploy and watch the logs stream: the platform clones the repo, runs composer, builds a container image and rolls it out. A minute or two later you have a your-app.abasthan.app URL with SSL working out of the box.

Step 5: Environment variables and auto-deploy

Put your APP_KEY, mail credentials and other secrets under Environment Variables instead of committing .env. Auto-deploy is on by default — push to your branch and it rebuilds and redeploys.

Common gotchas

  • 500 on first load (Laravel): a missing APP_KEY. Set it in environment variables.
  • Wrong document root: Laravel and Symfony serve from public/, not the repo root.
  • Composer platform errors: pin your PHP version in the app settings to match your composer.json requirements.

FAQ

Is PHP hosting really free here?

Yes — the first app runs on the Free plan at $0 with a free subdomain and automatic SSL, no credit card required.

Which PHP versions are supported?

PHP 8.1, 8.2 and 8.3. Choose the version in your app settings and rebuilds honour it.

Can I use a custom domain?

Yes, on every plan including Free — add your domain, point a CNAME, and verification and SSL are automatic.

Deploy your PHP app now

Push your Laravel, Symfony or plain PHP app and get a live HTTPS URL in minutes. First app free, no credit card, per-second billing when you scale.

Deploy Free

KS
Kumar Saha
Abasthan