laragón

Create development environments for PHP and other technology stacks, in a comfortable, fast way and with highly professional features.

Laragon is a relatively new option for creating what we call the development environment, that is, a whole set of programs needed to develop applications. It is used to work with PHP, but also with other server-side languages, such as Node, Python or Ruby.

It is highly recommended for developers who want to go a little further and increase their productivity and the benefits of their work environments, since it offers us in a simple and fast way and with little configuration, some things that other alternatives do not have, or require. the payment of a user license. Laragon, on the other hand, is free and is full of options that will surely please those who know it.

In this article we present the features of Laragon and compare it with others. We also teach you how to configure the most useful options that the program offers us.

Laragon Vs Xampp (or similar)

If you are just starting out with PHP we could simply tell you to try Laragon, because it will offer you everything you need to get started, and much more. But if you’ve been using PHP for a long time and you’re happy with your current work environment, it’s sure to come in handy to know what Laragon offers compared to other more traditional systems.

In the world of PHP there are many packages to install at once all the programs you need to develop in this language. The more traditional alternative is , which allows you to get the entire stack of programs necessary to work with PHP in a single step: Apache + PHP + MySQL (MariaDB in this case). Laragon offers exactly the same, but with several very special additions, which although we could obtain with Xampp, it would cost us a little more time and knowledge.

The most outstanding options of Laragon with respect to other alternatives are:

  • It offers the possibility of creating Virtualhost automatically
  • It allows to change the version of PHP that is being used, even the version of Apache or MySQL / MariaDB.
  • It has a utility for creating projects, which makes it very easy to install new virtual hosts, where we can even install applications such as WordPress, Laravel, etc. at once.
  • It has a system through which the work we have locally can be shared over the Internet, so that clients can see the status of the project, or we can access it through devices to test it.
  • The configuration of email, for sending locally and without falling into spam is quite simple.
  • Automatically installs a terminal program called “cmdr”
  • It is portable in some versions of Laragon
  • Allows you to work with Ngnix, in addition to Apache

In addition to the above, it offers many other possibilities that can come in handy, such as specific configuration options for each project, with which we can, for example, define a specific folder structure, a command line interface with which different operations, the possibility of putting the things you need in your case, or removing the excess, using other database engines such as PostgreSQL or MongoDB, integration with Memcached, Redis, Git, etc.

In summary, it is a very complete program with a long list of features. As you can imagine, it is more complex than other alternatives like Xampp, and you will need some knowledge and extra steps to configure it to make it your own. It is not difficult and the effort to learn it is worth it, especially for developers who have passed their “apprentice” stage and positively value introducing new tools into their workflow that facilitate productivity and work with projects with more advanced requirements.

Laragon’s downside is that it only works on Windows, at least at the time of writing. So if you use Linux or Mac, you will have to look for other alternatives.

First steps with Laragon

If you are interested in delving into this tool, the first step is to download it. On the download page you will have to get the Laragon distribution that you are specifically interested in. You will see that there are several alternatives, mainly divided by the language or the frameworks that are incorporated.

At the moment, if you are interested in developing for PHP, the most complete option is the first one, called “Laragon Wamp”. It’s 124MB. If that sounds like a lot to you, or if you want the option of creating a portable system (that you could carry on a USB stick and run on any Windows machine), there are other more suitable options.

The installation process is completely automatic, with the typical wizard that guides you step by step. It has no mystery.

Once installed we can open the program directly and we will find the Laragon screen, from which we have access to most of the functionalities. It is a fairly simple program interface, with five buttons with the main options at the bottom. In addition, at the top where it says “Menu”, we find a drop-down menu with a fairly large number of options to perform many types of actions.

The most laborious part is finding the way to perform each action that we need from our development environment. As we said, Laragon is characterized by offering many options, although often completing the actions is not as simple as pressing a simple button and requires some steps and configuration of the program, downloading software from the Internet, etc.

None of the tasks, however, is so complicated that a user with average experience cannot perform it. However, we are going to offer some notes on some of the more useful actions:

change language

Laragon is installed and initially appears in English. I am sure that it is not necessary for many, but if you want to change to Spanish you have to access the program settings. (Using the icon of the gear wheel that appears at the top right).

You will find many configuration options and, among others, the language of the program’s interface. Throughout this article I am using “Spanish” and the names of the menus that I am going to comment on are in Spanish. If they appear in English, you already know how to change them 😉

Change services and ports

Sometimes it is necessary to change the application ports. By default you find the typical ports for Apache (80) and MySQL (3306), but if you need to change it is also possible.

This definition is found in the configuration screen, the same one where you can change the language, but in a different tab called “Services & ports”.

Change PHP version

It is something that can be done in Laragon, but for example it is not possible in Xampp, or at least not in a simple way or without installing some other version of all of Xampp. At first, when Laragon is installed, you only have one version, but you can install others through a process that is explained by clicking on the “How to add another version…” link.

Basically what they ask you is to access the PHP site and download the version you need. Then you have to unzip it in the Laragon directory structure and the link to change to that new version will appear.

There is only one detail, that the PHP version must be compatible with the Apache version and for this both have to share the same architecture (64 or 32 bits) and the same “VC” packages (Visual C++ Redistributable for Visual Studio 2015) .

Changing the version of Apache and other software requires more or less the same steps.

Install PhpMyAdmin

It does not come installed at home, so you have to do a couple of steps on your own. You have to go to the download page of and download the software. Then you have to place it in a certain path, inside the Laragon folder (the one on your hard drive where you have placed Laragon).

path_to_laragon\etc\apps\phpMyAdmin

From then on, you will be able to access PhpMyAdmin from the Laragon interface itself, or by directly accessing the route http://localhost/phpmyadmin

Create projects with Laragon

One very cool thing about Laragon is how quickly the workspace for a new project is created. You get it from the “Quick website creation” menu and it offers you several alternatives such as WordPress, Joomla, prestashop, Drupal, Laravel, Symfony… It is also extensible for other types of projects.

Of course it also allows us to create a blank project, with which we can simply create 1) a new folder, 2) a to access that project with a local domain name, 3) a database.

Any project created is accessible with a virtual host, so it is isolated on a separate URL, which is more than convenient.

Change the document root of the project

If you wish you can configure the virtual host created by Laragon. This is necessary for example to change the path of the document root and is useful (and necessary in many cases) to be able to customize the project folder and create all the directory structure you could want on your server. To do this you have to go to the etc/apache2/sites-enabled/ folder (within the Laragon installation) and there find the name of your project, in a file with a .conf extension.

Inside you’ll find the typical Apache virtualhost configuration, which you’ll need to edit to set the path that’s appropriate for you. This configuration will have been created automatically, if you have the option “Automatically create virtual hosts” activated in Laragon’s preferences.

In the following code you can find the virtualhost configuration for a project in which I have defined the publication root folder to be, within the project, the “httpdocs” folder.

DocumentRoot “C:/laragon/www/laragonblank/httpdocs/” ServerName laragonblank.test ServerAlias ​​*.laragonblank.test, 0cc90e18.ngrok.io AllowOverride All Require all granted

Make public access to a local project, from the Internet

Something that is decisive in deciding to use Laragon is the ease with which you can make other people access a project you are developing locally over the Internet. This step creates a public web address, through which a tunnel is generated with which you can see the project live, just as it works on your local computer. It almost looks like magic 😉

To achieve this, Laragon uses a NodeJS application called Ngrok. It is a service that is initially free, although depending on whether there are more people using the tunnel at the same time, or if the number of…

See also  CSS positioning
Loading Facebook Comments ...
Loading Disqus Comments ...