Directory-Structure
Understand Laragon's Directory Layout
Laragon Directory Structure
By default, Laragon is installed at C:\laragon
. As Laragon is containerized, portable, and isolated, you can change the path (rename, move to another drive, or move to another machine) without any worries.
Structure
Laragon uses short, simple, lowercase folder names. Below is the structure and descriptions:
C:\laragon
├─── laragon.exe # Laragon run file
├─── data\ # Data dir for MySQL, MariaDB, PostgreSQL, MongoDB
│ └─── mysql\
│ └─── ...
├─── www\ # Document Root (where you store your projects)
│ ├─── proj1\
│ └─── proj2\
├─── usr\ # User's preferences - Laragon respects any changes in this folder
│ ├─── tpl\ # User-defined templates (for changing something permanently)
│ └─── laragon.ini # User's settings
├─── etc\ # Shared settings & apps
│ ├─── apps\
│ └─── ...
├─── bin\ # Binary dir
│ ├─── mysql\
│ └─── ...
└─── tmp\ # Where to store temporary data
Important Folders
Laragon is disposable - you can delete your data
directory and have new, fresh data. If you only use Apache, you can delete the bin\nginx
folder, and vice versa. You can delete the whole stack and reproduce it again on another machine as long as you keep these three folders:
Folder | Description | Note |
---|---|---|
data\ | Data directory for MySQL, MariaDB, PostgreSQL, MongoDB | You can change the Data directory in Menu > Preferences |
www\ | Document Root (where you store your projects) | You can change the Document Root in Menu > Preferences |
usr\ | User directory | Laragon stores user’s settings in this folder - so when reinstalling/updating Laragon, current settings will remain intact |
As they store meaningful data, you can read more information about them below:
data\
By default, the Data directory is located at C:\laragon\data
. If the Data directory doesn’t exist, Laragon will create it and make data for each service inside the folder with the corresponding name:
Service | Location |
---|---|
MySQL | {data_dir}\mysql |
MariaDB | {data_dir}\mariadb |
MongoDB | {data_dir}\mongodb |
PostgreSQL | {data_dir}\postgresql |
www\
By default, the Document Root is located at C:\laragon\www
. In the Laragon's Terminal, you can access the www\
folder using this environment variable:
cd %DOCUMENT_ROOT%
Laragon has an “auto-created virtual hosts” feature. So, when you put a folder named app
into www/
, you can access the project with a pretty URL:
http://app.test
You can also access the project via
http://localhost/app
. However, the first option is not only prettier but also helps you solve issues related to paths.
usr\
When running, Laragon copies default settings from bin\laragon
to usr\
.
Summary
Laragon's directory structure is designed for simplicity and flexibility, allowing easy customization and portability. Everything in its place, and easily replaceable.