Laragon: Simple, Flexible, and Modern Development Server Environment for Windows

Published On17 Sep 2022

Laragon: Simple, Flexible, and Modern Windows Development Environment that just works
Laragon is a simple, modern, and flexible Development Server solution for Windows that integrates PHP, Apache, Nginx, MySQL, NodeJS, and several other software to ease software development for PHP and NodeJS applications.

At its core, Laragon provides a straight-forward user-interface to control and tweak all of the software it manages. Behind the scenes, it monitors and re-configures the software as necessary. For example, when switching to a new PHP version, Laragon automatically re-configures the php.ini file to point to the new file URIs, updates the Windows PATH environment, and knows to reload Apache web server as well, all with a single click.

Laragon is a modern alternative to XAMPP and WAMP server, but with focus on extensibility and portability. Laragon does not use Windows Services to start server daemons such as MySQL server, but uses its own service orchestration to start/stop/reload services. This allows Laragon to be portable and isolated. Simply copying the Laragon to another device gets a fully working development environment that can automatically rewire itself when it starts on a new location or a device.


Laragon main UI, where server status is shown, with quick toggles and menu
Laragon main UI, with quick toggles, server status, and a menu


Although Laragon provides a simple and a minimal interface, it is quite flexible and extensible. Adding a new PHP/MySQL/Apache/etc version is as easy as dropping the new version and switching to it, and most of the automatic configuration files are run through user-modifiable templates. Laragon itself is merely a single 2MB executable file, and comes with several template files that can be customized to switch any use case.

Integrated Software, Services, and Features

Laravel integrates and ships with several programming languages, web servers, database management tools, DNS services (for remote access to local applications), and even a terminal emulator. The advantage of it is that Laragon can be used as a central control panel to turn on/off server processes (such as MySQL server or Apache web server), as well as quickly switch between different versions of that software.

Programming Languages

Laragon integrates with PHP and Node JS by default. The PHP and NodeJS versions might not be the latest, but installing the latest (or older, if it comes to that) versions of PHP and NodeJS is easy as placing the files in the specific directory, and switching to that new version:

Laragon provides a one-click toggle to switch between versions
Laragon provides a one-click toggle to switch between versions

Further, Laragon supports Ruby, Go, and Java as well,

When a new version is selected, Laragon can automatically update necessary configuration files (php.ini file for PHP) to point to the new version.

There is also an update to make Laragon update the system PATH variable to include the executable files of the programming languages as well. This makes it possible to easily run PHP/NodeJS applications in terminal, without having to type the full path to the executable file.

Laragon provides 1-click toggles to switch between PHP/NodeJS versions and to toggle PHP extensions

For PHP, Laragon provides a UI to easily enable or disable PHP extensions. It knows to use the correct extension or zend_extension directives and update the php.ini file of the corresponding PHP version and reload the configuration, all with a single click:

One-click toggles for PHP extensions
One-click toggles for PHP extensions

Laragon also ships with Composer and NPM, the dependency managers for PHP and NodeJS.

Web Servers

Laragon supports Apache 2 and Nginx web server software. Similar to programming languages, it is also possible to switch between multiple versions of Apache and Nginx.

One of the nicest features in Laragon is that it provides a 1-click option to enable HTTPS. When enabled, Laragon creates a self-signed certificate, and configures the web server to use the new HTTPS certificate. There is also an option to add the self-signed certificate to the Windows trust store.

1-Click HTTPS setup for Apache web servers
1-Click HTTPS setup for Apache web server

Database Systems and Tools

MySQL, MariaDB, PostgreSQL are supported in Laragon, and Laragon ships MySQL 8 installed by default.

There is also support for Redis and Memcached, with configurable port numbers from the UI.

For MySQL, Laragon integrates HeidiSQL and phpMyAdmin, which can also be updated individually without having to upgrade the whole Laragon installation.

Wildcard DNS and Ngrok Integration

To quickly test web sites running in the local server, Laragon integrates with Ngrok.

With Ngrok integration, Laragon can quickly expose a local web application to the Internet.

Note that Ngrok is a commercial service with a free offering available.

Additionally, Laragon can transform directories inside the web server Document Root to sub domains under Wildcard DNS domains such as xip.io, nip.io, or any other Wildcard DNS domain name. For example, a local web site placed at C:\local\my-app can be accessed as http://my-app.192.168.1.6.nip.io, where my-app is the name of the sub-directory inside the Document Root, and 192.168.1.6 is the private IP assigned to the device.

Terminal Emulators and Text Editors

Laragon ships with Cmder, a popular Terminal Emulator software available for Windows. Laragon configures Cmder to integrate with Git, PHP, with practical defaults set.

Additionally, Laragon provides a recent version of Notepad++, a popular text editor for Windows.

It is not required to use Cmder and Notepad++, but because they are bundled and pre-configured, it can significantly reduce the time it takes to get a working development environment setup.

Mail Catcher and Forwarder

Laragon includes a "Mail Catcher" feature that fixes a pain-point of testing emails from a local server. Laragon's solution catches all PHP mail() calls, and displays the email contents as a notification, so the email output can be checked quickly.

Mail catcher intercepts PHP mail() function calls, and displays the email contents making it easy to test emails being sent from the local PHP applications
Mail catcher intercepts PHP `mail()` function calls, and displays the email contents making it easy to test emails being sent from the local PHP applications

There is also a "Mail Sender" feature that can forward the emails intercepted to the actual destination using a real Gmail email address.

Laragon is portable and Isolated

One of the major advantages of Laragon is that it is portable, and isolated.

Laragon does not use standard Windows Services to start/stop services. When Laragon starts, it looks for PHP/MySQL/Apache/etc directories inside the Laragon directory, and re-configures the configuration files. Laragon handles the start/reload/stop actions of the software it manages.

This makes Laragon portable and isolated from the rest of the system. Laragon is easy to backup, as simple as backing up the Laragon directory (along with the Document Root and MySQL data directories if necessary), and requires no further changes in Windows.

Laragon does not use containers or virtual machines, and is not a proper isolation in a network or operating system context, but Laragon is as isolated as it can get, for a standard software package that is contained within a single directory.

Laragon vs Competition

Laragon is relatively new compared to other solutions that bring quick Windows development server setups. However, Laragon is a mature and widely used software that has a large user base.

Laragon vs XAMPP

XAMPP is one of the most popular development server software Windows, and it is also available for Linux-based operating systems and MacOS, while Laragon is Windows-only.

XAMPP is also a self-contained minimal solution, with tighter integration with integrated software including Apache, MySQL, and MariaDB, but XAMPP supports several more software including FTP servers and Mail servers, which Laragon does not support.

XAMPP does not support an easy switching feature to switch between multiple PHP/Apache/MySQL features, and requires manually replacing the software and configuration files. With Laragon, the configuration files are updated by Laragon based on the selected PHP version. The automatic configuration changes can be fine-tuned with template files as well.

Laragon vs WAMPServer

WAMPServer is also a popular Windows development server package, but unlike XAMPP, WAMPServer only supports Windows. Laragon is also Windows-only, so there is a parity between WAMPServer and Laragon in terms of supported operating systems.

Similar to Laragon, WAMPServer also provides quick switches to change the PHP version and toggle PHP extensions. It seems to not account for changes between PHP versions. For instance, PHP's Apache module identifier was renamed in PHP 8.0, but WAMPServer did not account for this change while Laragon cleverly updated the Apache configuration file correctly.

The scope of integrations and software WAMPServer supports is also significantly small compared to XAMPP and Laragon.

WAMPServer also lacks a documentation as extensive as Laragon's.

Where it falls short

Laragon is a great software to quickly setup a local development server on Windows. It gets many things right, with Laragon being a portable and isolated setup, with a clean UI and a single executable that is only 2MB in size. It supports several integrations with other web servers, database software, and more.

However, Laragon is not without any shortcomings either.

Laragon's approach of silently updating the configuration files means it is possible that a quick toggle can wipe out any custom changes made to configuration. Laragon does not make it clear which directives are updated automatically, and which ones can be changed.

Although Laragon comes bundled with many software, it can be cumbersome to update them to their latest versions. Cmder and Ngrok, for instance, are bundled with Laragon, but they are updated more frequently than Laragon itself. Slowly over the time, many users have preferred to remove the bundled software in favor of separate installations of the same software, but using a package manager (such as choco or scoop), to ease the software updates.

Recent versions of Laragon started to offer a minimal installation and laragon.exe file, which greatly helped to overcome said shortcomings.


Getting Started with Laragon

Installing Laragon is no different from installing an application on Windows. Head over to laragon.org/download, and download the installation program. The latest versions are available on GitHub Releases page.

Once installed, the following guides might help to install the latest PHP/Apache/MySQL versions:

Recent Articles on PHP.Watch

All ArticlesFeed 
How to fix PHP Curl HTTPS Certificate Authority issues on Windows

How to fix PHP Curl HTTPS Certificate Authority issues on Windows

On Windows, HTTPS requests made with the Curl extension can fail because Curl has no root certificate list to validate the server certificates. This article discusses the secure and effective solutions, and highlights bad advice that can leave PHP applications insecure.
AEGIS Encryption with PHP Sodium Extension

AEGIS Encryption with PHP Sodium Extension

The Sodium extension in PHP 8.4 now supports AEGIS-128L and AEGIS256 Authenticated Encryption ciphers. They are significantly faster than AES-GCM and CHACHA20-POLY1305. This article benchmarks them and explains how to securely encrypt and decrypt data using AEGIS-128L and AEGIS256 on PHP.
How to Install/Upgrade PHP 8.3 on MacOS with Homebrew

How to Install/Upgrade PHP 8.3 on MacOS with Homebrew

Install PHP 8.3 and PHP extensions on MacOS with Homebrew.
Subscribe to PHP.Watch newsletter for monthly updates

You will receive an email on last Wednesday of every month and on major PHP releases with new articles related to PHP, upcoming changes, new features and what's changing in the language. No marketing emails, no selling of your contacts, no click-tracking, and one-click instant unsubscribe from any email you receive.