Laragon - How to install and using it for local development

in utopian-io •  7 years ago 

Cover.png

If you're a web developer, I recommend laragon as a web server for local development. Why laragon? in my experience laragon is easy to use make you fast and effective to develop your project.

The greatness of laragon

  • Automatically create virtual host
  • Mail Catcher And Mail Sender
  • Simple switching Apache, PHP, MySQL and MariaDB
  • Easy creating projects with frameworks like Laravel, CakePHP, Symfony and etc
  • You can setup your environment as you need very easy
  • Here's the official site: https://laragon.org
    screencapture-laragon-org-1514379764643.png

    Installation Laragon


    If you're going to download page. you can see some packages of laragon. You can choose to install 1 or more packages as you need.
    screencapture-laragon-org-download-1514379751137.png

    In this tutorial I choose Laragon-WAMP Version 3.2. this packages include Apache to 2.4.29 VC15, Nginx 1.12, MySQL 5.7.19, PHP to 7.2.0 VC15, Node.js v-8, yarn 1.3.2 + ngrok, git, Memcached, Redis, Composer 1.5.3 . ...

  • Double click the installer you just downloaded to start the installation process.
  • In dialog box choose your language and then click ok
  • Press Next Then either leave the installation directory at default or choose a custom one directory in this case I put on default directory
  • and then press Next again. Read the information on this screen, you can checked or unchecked the configuration as you need.
  • after that press next once more. Read over the settings to confirm and then hit Install.
  • After finish, run the laragon.exe
  • Laragon homescreen

    How to Use


    In the homescreen any 5 button on the bottom, menu in the left top and gear icon in the right top.
    Button Start All: This use to start all service of the laragon packages
    Button Web: This button will open your default browser and navigate to localhost homepage.
    Button Database: Will show the HeidiSql to config and manage your database
    Button Terminal: Will show the cmder terminal including git
    Button Root: will show the root directory of your project.
    In the menu button you can see all configuration of laragon.
    and gear icon you can see the preference window.

    1. Configuration Domain for automatically create virtual host
    Here is the preferences window of laragon
    settingGeneral.png

    in this general tab you can change your projects directory and you can set the domain for virtual host name eg: {project_name}.me. By the default host name is http://project_name.dev.

    Next, when you create new folder in Document Root folder of laragon and the laragon automatically creates virtual host for you. if you want see the project with virtual host you should click menu button and then select www, now you can see your project with virtual hostname. click the hostname to navigate in the browser.
    menuWww.png

    2. Switching PHP , Apache and MYSQL version
    You can change php , Apache and MySQL version very easy from Laragon menu
    menuPhp.png
    Just select version and click on it. Restart Laragon and you are ready to develop.
    menuPhpswtch.png

  • Download and add php versions to Laragon
  • For php version you can find them on http://windows.php.net/download/ . You need Thread Safe version. Download it and and unzip it in C:\install_folder\bin\php in this case C:\laragon\bin\php.

    directoryPhp.png

    You can also enable or disable php extension very simple just click menu on left top hover on PHP -> Extentions and you just click the extension.
    menuPhpExt.png

    Changing your MySQL version is also that simple.

  • Download and install more MySQL versions
  • You can find and download MySQL zip version here https://dev.mysql.com/downloads/mysql/. Download Windows, ZIP Archive version and unzip it in C:\install_folder\bin\mysql.

    menuMysqlSwtch.png

    But, in this case I switching with maria db.

  • Download and install Mariadb version on Laragon
  • Mariadb version you can download here https://downloads.mariadb.org/, click on latest version. For me lastest version is Download 10.2.11 Stable Now! and from inside download Windows zip file. Unzip and it in C:\install_folder\bin\mysql in this case C:\laragon\bin\mysql. Now restart Laragon and select your new version.

    directoryMysql.png

    3. Easy creating projects with frameworks
    You can easy create new project with number of platforms and frameworks. Laragon works with github so it will always download the newest version. Platforms and Framework that are default in Laragon are:

  • Laravel
  • Lumen
  • Symfony
  • CakePHP
  • WordPress
  • Joomla
  • others
  • You can also add platforms and frameworks you work with.

    How to create new project with Laravel in Laragon?
    Click Menu in main window of Laragon or right click with your mouse from System Tray and click Quick Create.
    menuCreate.png

    Select your platform or framework and click on it give your project a name. This name will be also the name of the folder and your domain. For example if we call the new project tutorial , domain will be http://tutorial.me.
    createProject.png

    Wait Laragon to do its work
    When create project laragon automatically create database with the same name of project
    Restart Laragon and now you can access your new site.
    createProject1.png

    All done, I hope this tutorial can help you about laragon how to install and using it. and can make your local development faster and easier. Simple right.
    Thank you



    Posted on Utopian.io - Rewarding Open Source Contributors

    Authors get paid when people like you upvote their post.
    If you enjoyed what you read here, create your account today and start earning FREE STEEM!
    Sort Order:  

    nice post bro.. very usefull :)

    approved wokwowkowkow

    Your contribution cannot be approved because it does not follow the Utopian Rules.

    • The repository's latest commitment must not exceed 1 year.
    • The repository has crossed 1 year and thus has been rejected.
      You can contact us on Discord.
      [utopian-moderator]