Laragon: My new local webserver

I have been working in web development for a while now, and in the last 12 years, all my work has been around WordPress. With that said, having an all-round, easy to use development web server is essential to keep things organized, to test the code and not waste time on settings new environments, and reinventing the wheel with each project.

XAMPP and WAMP

Before I talk about Laragon, I would like to first go through my development web server history. First, I always used Windows-based computers for all my development work. When I was starting, the only viable solutions for Windows development was to set everything manually or to use XAMPP or WAMP server software. For a while, I used WAMP, but for the most part, XAMPP was my preferred environment. And I had different versions of XAMPP installed until recently, each one with varying versions of PHP.

Local

But, some three years ago, I discovered the new and great Local (by Flywheel). Local was slick looking, with support for SSL, mail catching, changing PHP versions, and much more. It was using virtualization for each website, it was made for WordPress first of all, and it used VirtualBox and Docker to isolate each site and handle all the cool stuff. It was buggy, it had issues, but it made development changes that were painful with XAMPP, a breeze. So, I started migrating my development websites to Local, and last year, 80% of my development work was done via Local, and the rest was still on XAMPP.

But, late last year, Flywheel introduced Local 5 to replace older Local 3. Local 5 no longer used Docker or VirtualBox, making it hard to run some other web server at the same time, it lost some essential stuff (it had no support for Apache, only Nginx). Over time, they built on it, and now Local 5.6 can (sort of) use both Apache and Nginx (it never worked for me) as well as different MySQL versions.

And I did attempt to switch to it (Local 3.3 was not able to run PHP 7.4 or newer, it was virtually abandoned), and used it for few websites. Each new Local 5 version did fix few things but broke something else, and most important, it was not able to run alongside Local 3 due to the conflict with Windows HOSTS file, and the Local developers never fixed that despite promising a fix for months. Finally, the last few changes added Apache support. Still, switch to Apache was permanently destroying the site in Local (data was safe – but the location could not run anymore), throwing errors, and these errors were there for months now, no fix in sight.

So, I had enough. For the last 3-4 months, I wasted a lot of time trying to set it up, and there were days when I lost more than half a day reinstalling Local, setting it up, testing, and still ending up with the unusable systems.

Laragon

Now, I spent a lot of time researching the alternatives. I needed a system that will allow switch between PHP versions, using Apache and Nginx, and maybe having support for different MySQL versions. After testing various things, I ended up with Laragon.

Laragon basic interface and settings

Laragon is not easy to use as Local, but once you set it up, it is working as you expect it to. Most operations are done via the context menu for the application sitting in the taskbar notifications area.

Laragon main controls

There are so many features included to make setup and use of the web server easier, related to Apache, MySQL, PHP, creation of new apps, various tools, and more. Laragon includes PHPMyAdmin and HeidiSQL for database management; it has Node.js built-in, support for SSL out of the box, and much more.

One thing that came as a huge surprise in running Laragon, was its raw speed. When compared to XAMPP and Local, Laragon is faster, much faster. The website running on XAMPP (similar PHP, MySQL, and Apache versions) had an average page load speed of 1.1 seconds, the same website under Laragon was loading in 0.4 seconds. With Local 3.3, the average page load was 2.1 seconds, with Local 5.6 it was 2.8 seconds, and the same websites in Laragon were about 0.3 seconds. That is a massive difference.

Well, Laragon too has some issues, but I was able to resolve everything quickly. One thing that proved highly problematic is to run MySQL and MariaDB and switch between them. So far, I was not able to make MariaDB work in the same way as MySQL, so I left only MySQL 8 running on Laragon (no password issue was not possible to reconcile between the two). I have MariaDB running outside of Laragon if I need to run some tests with it.

In the past week, I have migrated all my development websites from XAMPP and Local into Laragon. I reclaimed a lot of disc scape used by Local – same content database and files under Laragon used 25 GB, and under Local was close to 50 GB (because database data was duplicated with Local, and Local 3 also used Docker image running each site webserver). I also noticed a lot more RAM is now free, CPU usage is down.

For the first time in the last 12 years, my main development laptop no longer has XAMPP installed. So far, Laragon is great, once set up, it just works, and makes testing with different PHP versions easy, and I plan to start testing all my plugins with PHP 8 due to be released by the end of this year.

What local webserver you use for development, and what are your experiences with Laragon or any other web server out there? Let me know in the comments.

Please wait...

Posted by Milan Petrovic

Programmer since the age of 12 and WordPress developer since 2008 as freelancer and author of more than 250 plugins and more than 20 themes.

Dev4Press - Premium plugins for your WordPress and bbPress powered website.

Leave a Reply

Your email address will not be published. Required fields are marked *