BENTECH

How to Install and Run Laravel Locally in One Click Using Laragon

This tutorial demonstrates how to set up and run a local Laravel environment on Windows using Laragon without manually writing Composer or command-line setup instructions.…

This tutorial demonstrates how to set up and run a local Laravel environment on Windows using Laragon without manually writing Composer or command-line setup instructions. Laragon automates local server provisioning, including Apache, MySQL, Mailpit, database creation, and automatic virtual hosts. After downloading and installing the full edition of Laragon, the host environment is activated using the 'Start All' button. From Laragon's Menu, selecting 'Quick app' > 'Laravel' prompts the user for a project name, automatically running Composer to install the application, setting up the database, and creating a clean local domain alias (e.g., http://bentech.test). The video also covers troubleshooting connection errors via server restarts, locating project files inside Laragon's 'www' directory, modifying views such as 'welcome.blade.php' in Visual Studio Code, and utilizing built-in Laragon utilities such as Root, Terminal, and HeidiSQL Database management.

Section 1: Introduction to One-Click Laravel Installation

Introduction to One-Click Laravel Installation • Downloading and Installing Laragon Full Edition • Starting Services and Configuring System Permissions

Lesson 1.1: Introduction to One-Click Laravel Installation

  • Laragon eliminates manual terminal commands for initial Laravel project creation.
  • Automatic virtual hosts provide clean local development URLs.

Setting up Laravel traditionally requires command-line familiarity with PHP, Composer, and local web servers. With Laragon, users can scaffold and serve a full Laravel application locally simply by providing a project name through a GUI wizard.

Practical work

  1. Reproduce the demonstrated step for: Laragon eliminates manual terminal commands for initial Laravel project creation. and verify the result yourself.

Lesson 1.2: Downloading and Installing Laragon Full Edition

  • Download the Full package from laragon.org.
  • Select your preferred storage drive for the Laragon root.
  • Approve security and administrator prompts during installation.

To get started, visit laragon.org and navigate to the Download page. Download the full version (such as Laragon 2025 Full), which packages Apache, MySQL, PHP, Mailpit, and essential CLI tools. Run the installer executable, bypass any Windows Defender SmartScreen prompts by selecting 'More info' followed by 'Run anyway', select an installation destination drive (e.g., E:\), and complete the installation wizard.

Practical work

  1. Reproduce the demonstrated step for: Download the Full package from laragon.org. and verify the result yourself.

Lesson 1.3: Starting Services and Configuring System Permissions

  • Click 'Start All' to boot Apache and MySQL.
  • Allow Windows Firewall permissions for Apache and MySQL services.
  • Mailpit handles local email capture out of the box.

Launch Laragon and click 'Start All' to initialize services including Apache, MySQL, and Mailpit. When Windows Defender Firewall prompts appear, grant access so the local HTTP server and background services can communicate properly.

Practical work

  1. Reproduce the demonstrated step for: Click 'Start All' to boot Apache and MySQL. and verify the result yourself.

Section 2: Scaffolding a Laravel Project via Quick App

Scaffolding a Laravel Project via Quick App • Accessing the Local Application and Resolving Connection Errors • Editing Project Views in Visual Studio Code

Lesson 2.1: Scaffolding a Laravel Project via Quick App

  • Navigate to Menu > Quick app > Laravel.
  • Provide a project name to trigger automated Composer project scaffolding.
  • Laragon creates a matching MySQL database automatically.

Right-click anywhere on the Laragon window or click 'Menu', then select 'Quick app' > 'Laravel'. Enter the desired project name (such as 'bentech') and click 'OK'. Laragon automatically generates the project database, executes 'composer create-project', and configures the virtual host.

Practical work

  1. Reproduce the demonstrated step for: Navigate to Menu > Quick app > Laravel. and verify the result yourself.

Lesson 2.2: Accessing the Local Application and Resolving Connection Errors

  • Projects reside in the 'www' directory of your Laragon installation.
  • Default local domains follow the '{projectname}.test' naming convention.
  • A quick Stop/Start restart in Laragon resolves initial domain resolution refusals.

Once installation completes, the console displays the file path (e.g., E:\laragon\www\bentech) and the local virtual host URL (e.g., http://bentech.test). If navigating to the URL immediately returns a connection error in your browser, click 'Stop' in Laragon and then click 'Start All' to restart Apache and DNS routing. Refreshing the browser will successfully load the Laravel welcome page.

Practical work

  1. Run or reproduce this step, then verify the result: http://bentech.test

Lesson 2.3: Editing Project Views in Visual Studio Code

  • Application frontend templates are stored in 'resources/views/'.
  • Modifying 'welcome.blade.php' updates the landing page.
  • Local changes reflect instantly without manual server rebuilds.

Open the generated project directory in Visual Studio Code. Locate 'resources/views/welcome.blade.php' in the file tree. Edit the HTML/Blade template, save the file, and refresh the browser to confirm local code changes are immediately reflected.

Practical work

  1. Reproduce the demonstrated step for: Application frontend templates are stored in 'resources/views/'. and verify the result yourself.

Section 3: Exploring Laragon Built-In Utilities: Root, Terminal, and Database

Exploring Laragon Built-In Utilities: Root, Terminal, and Database

Lesson 3.1: Exploring Laragon Built-In Utilities: Root, Terminal, and Database

  • 'Root' opens Explorer to the web root folder.
  • 'Terminal' provides an immediate CLI context.
  • 'Database' launches the GUI database management client.

Laragon includes convenient dashboard buttons. 'Root' opens the project's folder in Windows File Explorer. 'Terminal' launches an integrated CLI pre-configured with project environment variables. 'Database' opens HeidiSQL for managing local MySQL databases.

Practical work

  1. Run or reproduce this step, then verify the result: cd bentech