Laragon: PHP development environment, prepared in less than 2 minutes


-

Very easy, fast, automated Apache, MySQL, PHP environment (AMP) which can be installed and configured in light speed. Here is very quick tutorial how to do it!

In this case, we will install PHP developer environment and create test project to be ready to start write a first line of code.

Install Laragon

Download and install package Laragon Lite in my case, because there is very simple way to add another packages you need later. After install process simply run it and click to Start All button.

Change PHP version (optional)

Simply download another version of PHP and unpack archive to \laragon\bin\php\ folder. Then you can change PHP version by right click on Laragon tray icon and select PHP>Version. Wow! that was unbelievable simple.​​

Fine tune Preferences to auto-create virtual hosts

You can set Document root of Laragon where your projects are stored. After Laragon start or restart Apache server, Document root directory ( you can have more than one ) is scanned for new projects and Laragon will automaticaly create virtual host in Apache configuration and new row in Windows router file /etc/hosts 

In my case is default .test domain suffix changed to .local - domains will be created with {domain}.local address.

Let's create new project

Only thing you have to do is create a project folder in document root directory and restart Laragon Apache!

And that is it! You can start to develop your new project in your new folder. Laragon will  create and set virtual host and also new row in /hosts file!

Set custom project public directory

In my projects are application files separated from public directory. So you can tell Laragon to use specific directory as public by little change in /laragon/usr/laragon.ini. Just add this line to [preferences] section:

PublicDir=www

it will be detected as project start folder with index.php file for each new project.

And this is only beginning...

You can find more info on laragon.org

​​​​​​​Thank you Leo Khoa - good job!

Komentáře k článku