How to use Laragon software to create and manage a Laravel project in Windows.

🌍 The French version of this publication : Comment créer un projet Laravel avec Laragon

Introduction to Laragon

Laragon is a web development environment that brings together several servers essential to application development. These include :

  • Apache HTTP Server: The default HTTP server, running on port 80, which handles user requests.
  • MySQL: A SQL relational database server, running on port 3306, for storing and managing your data.
  • Redis: An in-memory distributed key-value database server.

In addition to these servers, Laragon offers a variety of tools to facilitate development and simplify management of your web applications by centralizing everything in one place:

  • PHP: A scripting language widely used for web development.
  • Node.js: A JavaScript runtime for creating server-side applications.
  • Composer: A dependency manager for PHP that facilitates the integration of third-party libraries.
  • HeidiSQL and PhpMyAdmin: Database administration tools that make data management more accessible.
  • Notepad++: A lightweight, high-performance code editor.
  • Git : Decentralized version management software
  • ...

Laragon stands out for its simplicity, resembling popular solutions such as XAMPP and WAMP, but with features that make it particularly suitable for modern developers.

In this guide, we'll explore the steps involved in installing Laragon and discover how to use it to create a new Laravel project on Windows.

An alternative to Laragon is Laravel Herd. See our tutorial for more information : Laravel Herd : How to install, configure and create a Laravel project

Installing Laragon

To install Laragon on Windows, start by downloading the installer from this link https://laragon.org/download/, choosing the version suited to your system architecture (32 or 64 bits).

Please note : Laragon requires a paid license from version 7.0.3 upwards. To bypass this, you can download an earlier version from Github https://github.com/leokhoa/laragon/releases.

Download Laragon - Full

Once you've downloaded the laragon-wamp.exe file, run it to start the installation process:

  1. Select the installation language.
  2. Select the installation folder (default: C:\laragon).
  3. Configure additional options according to your preferences:
    • Start Laragon with Windows : enables Laragon to start automatically with Windows.
    • Automatically create virtual hosts: enables you to create attractive URLs for applications, e.g. https://mon-app. test.
  4. Before finalizing, the Ready to install step summarizes all the options you've selected. Check them, then click Install to start the process.

Laragon: Installation - Ready to install stage

Once the installation is complete, we recommend that you restart your computer to ensure that all configurations have been taken into account.

Creating a Laravel project in Laragon

This is Laragon's main interface or dashboard.

Laragon's main interface

In this interface, the title bar shows Laragon version, PHP version, local IP address and installation path.

Below the title bar :

  • The menu (more on this later).
  • Started servers (Apache, MySQL and Redis) with their versions.
  • Reload button to restart all servers.
  • The Settings button to manage your preferences.

Further down, you'll find :

  • Stop to stop or start all servers.
  • Web to access https://localhost/.
  • Database to open HeidiSQL and manage your databases.
  • Terminal to open Cmder.
  • www folder to explore your projects in C:\laragon\www.

When Laragon is closed, its icon is moved to the notification area (near the clock). A left-click on the icon opens the main interface, while a right-click displays a contextual menu with additional options.

To create a new Laravel website in Laragon, simply click on Menu > Create a website quickly > Laravel in the main interface, or right-click on the Laragon icon in the notification area and click on Create a website quickly > Laravel.

Laragon - Creating a new Laravel project - tray icon

This action opens a dialog box where you can enter the name of the Laravel project ("laravel-project" in my case), then click OK:

Laragon - Enter name of new Laravel project

Laragon will automatically create a database with the same name as the project (laravel_project), then upload the application files to the C:\laragon\www\laravel_project directory:

Laragon - laravel project in progress

Once the Laravel project has been created, grant Laragon authorization in User Account Control (UAC) so that he can create a virtual host for your application.

Laragon - authorize via User Account Control

Next, authorize Apache HTTP Server and MySQL to access the network via the Windows firewall by clicking on Allow access.

Windows 11 - authorize apache http server

Windows 11 - Authorizing MySQL on the firewall

The new project is immediately accessible at http://laravel-project.test

Have a good code start and be well! 😇