
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
- Go to the Laragon website and download the latest version. Grab the Full edition — it includes Apache, PHP, MySQL, and all the goodies.
- Run the installer. During setup: - Choose your installation directory. I use
C:\laragonbut 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. - Click Install and wait a minute.
- 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.
- Go to getcomposer.org and download the Windows installer.
- 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.) - Complete the installation with default settings.
- 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.
- Go to gitforwindows.org and download the installer.
- 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). - Complete the installation.
Step 4: Configuring Laragon
Open Laragon and let's get things set up:
- Click the Start All button. This starts Apache and MySQL.
- You'll see the status indicators turn green.
- 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
- In the Laragon dashboard, click Quick Create.
- Select Laravel from the list.
- Give your project a name (e.g.,
my-first-app). - 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:
- Make sure Laragon's services are running (Apache + MySQL).
- Open Git Bash from the Start menu.
- Navigate to Laragon's www folder:
bash cd /c/laragon/www - Create a new Laravel project:
bash composer create-project --prefer-dist laravel/laravel my-projectThis downloads Laravel and all its dependencies. It takes a minute or two depending on your internet speed. - When it finishes, navigate into your project:
bash cd my-project - 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:
- Right-click the Laragon tray icon.
- Go to SSL > Enabled.
- Laragon generates a self-signed certificate for you.
- Access your site at
https://my-project.testinstead ofhttp.
Adding New Projects
Every new Laravel project follows the same pattern:
- Open Git Bash in
/c/laragon/www. - Run
composer create-project --prefer-dist laravel/laravel new-project-name. - 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.