Jun 23, 2023 5 min read

Laravel Development on Windows: Laragon Setup, Composer & Git Bash

# Laravel Development on Windows: Laragon Setup, Composer & Git Bash If you've tried setting up a Laravel development environment on Windows, you know the pain. WampServer? XAMPP? Manually configuring Apache, PHP, and MySQL? It works, but it's fiddly and every project ends up needing slightly diffe

Laravel Development on Windows: Laragon Setup, Composer & Git Bash
Laravel development on Windows with Laragon

If you've tried setting up a Laravel development environment on Windows, you know the pain. WampServer? XAMPP? Manually configuring Apache, PHP, and MySQL? It works, but it's fiddly and every project ends up needing slightly different settings. For more details, check out Setting Up a Python Development Environment on VirtualBox wi. For more details, check out How to Install macOS in VirtualBox on Windows (2026 Guide). For more details, check out 📝 Cambridge AS & A Level Computer Science June 2025 Paper 2 .

Enter Laragon. It's a lightweight, portable development environment that makes local PHP development — especially Laravel — actually pleasant on Windows. Combined with Composer and Git Bash, you've got a setup that rivals what macOS and Linux developers have enjoyed for years.

In this guide, I'll walk you through getting Laragon installed, configuring Composer and Git, and creating your first Laravel project.

What is Laragon?

Laragon is a portable development environment for Windows. Think of it as a modern replacement for XAMPP or WampServer. It runs Apache, Nginx, PHP, MySQL, MariaDB, Redis, and more — all from a single, lightweight application that doesn't clutter your system.

Key features that make it worth using: - Portable — runs from any folder, doesn't install system services - Quick create — spin up WordPress, Laravel, Drupal, or an empty project with one click - Built-in SSL — generate HTTPS certificates for local development - Virtual hosts — automatically create myproject.test URLs for each project - PHP version switcher — change PHP versions per-project with a dropdown - Node.js, Python, Ruby support — not just PHP

Prerequisites

Before we start, make sure you have: - Windows 10 or later (64-bit recommended) - A stable internet connection - About 10 minutes of your time

Step 1: Installing Laragon

  1. Go to the Laragon website and download the latest version. Grab the Full edition — it includes Apache, PHP, MySQL, and all the goodies.
  2. Run the installer. During setup: - Choose your installation directory. I use C:\laragon but any path works. - Select the components: Apache, MySQL/MariaDB, PHP 8.x (latest stable). - Choose your preferred text editor. Visual Studio Code or Sublime Text both work great.
  3. Click Install and wait a minute.
  4. Once installed, launch Laragon.

You'll see the Laragon dashboard — a small window with buttons for Start All, Stop All, and a few others. It looks simple, and that's the point.

Step 2: Installing Composer

Composer is PHP's dependency manager. Every Laravel project uses it.

  1. Go to getcomposer.org and download the Windows installer.
  2. Run the installer. When it asks for the PHP executable path, point it to Laragon's PHP: C:\laragon\bin\php\php-8.x\php.exe (Replace 8.x with the actual PHP version Laragon installed.)
  3. Complete the installation with default settings.
  4. Verify it worked by opening a new Command Prompt and running: composer --version

Step 3: Installing Git Bash

Git Bash gives you a Unix-style terminal on Windows. It's essential for running Laravel's artisan commands and managing your code with git.

  1. Go to gitforwindows.org and download the installer.
  2. Run the installer. Key choices: - Components — make sure Git Bash is selected. - Default branch name — I keep main (the modern standard). - Adjusting your PATH environment — choose "Git from the command line and also from 3rd-party software". - Line ending conversions — "Checkout as-is, commit Unix-style line endings" is safest for cross-platform work. - Terminal emulator — Use MinTTY (the default for Git Bash).
  3. Complete the installation.

Step 4: Configuring Laragon

Open Laragon and let's get things set up:

  1. Click the Start All button. This starts Apache and MySQL.
  2. You'll see the status indicators turn green.
  3. Open your browser and go to http://localhost. You should see the Laragon welcome page.

A quick tip: Laragon's menu has a handy PHP version switcher. Right-click the Laragon icon in your system tray, go to PHP > Version, and you can switch between PHP versions instantly. This is a lifesaver when you're working on projects with different PHP requirements.

Step 5: Creating Your First Laravel Project

There are two ways to create a Laravel project with Laragon.

Method A: Using Quick Create

  1. In the Laragon dashboard, click Quick Create.
  2. Select Laravel from the list.
  3. Give your project a name (e.g., my-first-app).
  4. Laragon downloads Laravel, sets up the database, and creates a virtual host — all automatically.

Method B: Using Composer from Git Bash

I prefer this method because it gives me more control:

  1. Make sure Laragon's services are running (Apache + MySQL).
  2. Open Git Bash from the Start menu.
  3. Navigate to Laragon's www folder: bash cd /c/laragon/www
  4. Create a new Laravel project: bash composer create-project --prefer-dist laravel/laravel my-project This downloads Laravel and all its dependencies. It takes a minute or two depending on your internet speed.
  5. When it finishes, navigate into your project: bash cd my-project
  6. Start the Laravel development server (optional, only if you want to use Artisan instead of Apache): bash php artisan serve

Accessing Your Laravel Site

Since Laragon auto-creates virtual hosts, your project should be accessible at:

http://my-project.test

If that doesn't work (some Windows configurations need an extra step), use:

http://localhost/my-project/public

Working with Laravel in Laragon

Artisan Commands

Git Bash is where you'll spend most of your time once the project is set up. Common Laravel commands:

# Create a new controller
php artisan make:controller PostController

# Run database migrations
php artisan migrate

# Clear cache
php artisan cache:clear

# List all routes
php artisan route:list

# Generate model with migration
php artisan make:model Post -m

Database Management

Laragon comes with Adminer (a lightweight database manager). Access it at:

http://localhost/adminer

Login with: - Server: localhost - Username: root - Password: (leave blank, no password by default in Laragon)

You can create, edit, and query databases right from your browser.

Enabling SSL for Local Development

Need HTTPS for your local Laravel site? Laragon makes it simple:

  1. Right-click the Laragon tray icon.
  2. Go to SSL > Enabled.
  3. Laragon generates a self-signed certificate for you.
  4. Access your site at https://my-project.test instead of http.

Adding New Projects

Every new Laravel project follows the same pattern:

  1. Open Git Bash in /c/laragon/www.
  2. Run composer create-project --prefer-dist laravel/laravel new-project-name.
  3. Access it at http://new-project-name.test.

That's it. Laragon handles the virtual host configuration automatically.

Troubleshooting Common Issues

Issue Fix
Port 80 in use (Skype, IIS) In Laragon > Menu > Apache > Port, change to 8080
PHP version too old for Laravel Laragon > PHP > Version > switch to 8.1+
"Composer not found" in Git Bash Restart Git Bash after installing Composer
Virtual host .test not resolving Right-click Laragon icon > Tools > Add .test domains to hosts file
MySQL won't start Check if another MySQL instance is running on port 3306. Stop it or change Laragon's MySQL port

Final Thoughts

Laragon completely changed how I develop Laravel applications on Windows. It removes all the friction — the environment configuration, the virtual host setup, the PHP version juggling — and lets you focus on actually building things.

Pair it with Composer for dependencies and Git Bash for terminal commands, and you've got a development workflow that's on par with any Linux or macOS setup. The three tools together cover everything: local server, package management, and version control.

Give it a try on your next Laravel project. I think you'll wonder why you didn't set it up sooner.