One of the areas of WordPress that, in my opinion, is not covered by a lot of quality plugins, is developer-oriented – debugging. There are maybe two good plugins available right now, and I have recently decided to change that. My new free plugin for WordPress, called DebugPress has been recently released.
Way back in 2011, I have created my first debugging plugin. It was fairly limited, but, it helped me a lot in learning how WordPress work, and I used that debugger for a while. It was part of the GD Press Tools Pro plugin. In 2015, I started working on GD Press Tools Pro 5.0, and I decided to completely rewrite the debugger.
And, when the plugin was released, it had a new Debugger that is the basis for the development going forward and will shape to what it is today. The debugger was part of the Pro version only, and it has grown a lot since 2015, and unfortunately, only a limited number of WordPress users had the chance to use it.
Very often, I get questions about the development process I use, and very often, that involves the tools I use, and one of the most important tools is Debugger, especially with WordPress and PHP. So, while I always recommend my plugin and debugger, that is not that simple, because the plugin was not free.
Last year I decided to create a new and free plugin that will have full Debugger included. The problem was the integration of the Debugger inside the GD Press Tools Pro, and it was not simple code migration to the new plugin. While I was thinking about what to do, other things were more important, and time flew by. But, finally, a few weeks ago, I had some free time available, so I started the work on the new plugin.
Surprisingly, the work took only 4 days. I had to transfer a bit more code than I anticipated, and I had to remove some features that required other GD Press Tools Pro features. But, I also decided to improve various things and add some new features as well.
I was a bit lucky to get the ‘debug.press‘ domain name, and the plugin was officially named DebugPress. The plugin is free, available on WordPress.org and it is on GitHub, so anyone can contribute.
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.
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.
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 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.
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.