How to Deploy a Laravel App to a VPS: Step-by-Step Checklist

A clear checklist for deploying a Laravel application to a VPS with Nginx, PHP-FPM, SSL, queues and safe production settings.

AD Admin PenduCoder October 6, 2026 2 min read
How to Deploy a Laravel App to a VPS: Step-by-Step Checklist

Why Deploy to a VPS?

Shared hosting is fine for simple sites, but a VPS gives you full control over PHP versions, queues, scheduled tasks and performance. It is also the skill clients expect from a professional Laravel developer.

What You Need Before You Start

  • A VPS running Ubuntu with SSH access
  • A domain name pointed at your server IP
  • Your Laravel project in a Git repository

Step-by-Step Deployment Checklist

1. Secure the Server

Create a non-root user, enable the firewall, allow only SSH, HTTP and HTTPS, and disable password login in favor of SSH keys.

2. Install the Stack

Install Nginx, a supported PHP version with required extensions, Composer, and MySQL or PostgreSQL.

3. Pull Your Code

Clone the repository into your web directory and run composer install with the no-dev option for production.

4. Configure Environment

  • Copy the example env file and set production values
  • Set the app environment to production and debug to false
  • Generate the application key
  • Add database and mail credentials

5. Run Migrations and Optimize

Run your migrations, then cache config, routes and views to speed up requests.

6. Set File Permissions

The web server user must be able to write to the storage and bootstrap cache folders, and nothing more.

7. Configure Nginx

Point the document root to the public directory and route requests through PHP-FPM.

8. Enable HTTPS

Use Certbot to issue a free SSL certificate and enable automatic renewal.

9. Set Up Queues and Scheduler

Use Supervisor to keep queue workers running and add the scheduler entry to cron.

Common Mistakes to Avoid

  • Leaving debug mode on in production
  • Committing the env file to Git
  • Forgetting to restart queue workers after a deploy
  • Skipping backups

Automate Future Deployments

Once the manual process works, script it or use a CI/CD pipeline so each push deploys safely. Learn the whole flow in the deployment modules at PenduCoder.

AD

Admin PenduCoder

Full-stack developer and educator. Writes about Laravel, Next.js, applied AI and the unglamorous parts of shipping software.

Get in touch →