On this page
Laragon is a portable, isolated local development environment for Windows. It includes PHP, Apache, MySQL and Composer, and its Auto Virtual Hosts feature gives every project in its www folder a pretty URL such as http://myoctober.test. This article installs October CMS from Laragon's terminal, using Laragon's MySQL server and an automatic virtual host.
Before You Begin
Download and install Laragon. During setup, keep the Auto Virtual Hosts option enabled so that projects are served at {name}.test addresses without editing the hosts file or the web server configuration.
October CMS requires PHP 8.2 or higher. Laragon can run several PHP versions side by side, and you switch between them with Menu → PHP → Version.
The installer asks for your License Key, so have it ready from your October CMS account before you start.
Note: Laragon 7 and later is free for non-commercial use, and a license is required for commercial use. See the Laragon FAQ for details.
Start Laragon
Open Laragon and click Start All. This starts the web server and the MySQL server.
Open the Terminal
Open Laragon's terminal with Menu → Laragon → Terminal. After opening it, you can toggle its visibility with Ctrl + `. The terminal runs in Laragon's own isolated environment with its PATH set up, so the php, composer and mysql commands are the ones bundled with Laragon, independent of anything else installed on the system.
The remaining commands in this article are typed into this terminal.
Create the Database
Create an empty database for the project. Laragon's MySQL server uses the root user with an empty password.
mysql -u root -e "CREATE DATABASE myoctober"
Create the Project
Projects placed in Laragon's document root (C:\laragon\www for a default installation) are served automatically. Change to that directory and create the project with Composer. The following command creates a new project in a directory called myoctober:
cd C:\laragon\www
composer create-project october/october myoctober
When the command finishes, enter the project directory:
cd myoctober
Install October CMS
Run the installation command.
php artisan october:install
The installer asks a series of questions. Use the following answers for the Laragon setup, pressing ENTER to accept a default value shown in brackets.
| Prompt | Answer |
|---|---|
| Select Language | en, or another language code from the table |
| Application URL | http://myoctober.test |
| Backend URI | /admin (or a custom address for the admin panel) |
| Database Engine | MySQL |
| Database Host | 127.0.0.1 |
| Database Port | 3306 |
| Database Name | myoctober |
| Database Login | root |
| Database Password | Leave empty |
| Install the demonstration theme and content? | yes |
| License Key | Your license key |
After the license key is accepted, the installer downloads the October CMS packages with Composer.
Tip: If the installation appears to freeze after entering the license key, press the ENTER key several times to allow the process to continue.
The last step is the migration command that initializes the database.
php artisan october:migrate
Open the Website
In the Laragon window, click Reload. Laragon generates the virtual host for the new myoctober folder, and the site becomes available at:
http://myoctober.test
Add /admin to the URL (or the custom backend URI you chose) to open the admin panel and create your first administrator account.
http://myoctober.test/admin
Previewing Emails with Mailpit
Laragon includes Mailpit, which captures outgoing email locally. To send October CMS email to Mailpit instead of a real mail server, set these values in the project's .env file:
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
With Mailpit running, open http://localhost:8025 to see the captured messages.
Adding October CMS to Quick App
Laragon's Quick app menu creates a project, its database and its pretty URL in one step. To add October CMS to the menu, click Menu → Quick app → Configuration and add the following line to the configuration file ({LARAGON_ROOT}\usr\sites.conf):
October CMS=composer create-project october/october %s
Then choose Menu → Quick app → October CMS and enter a project name such as myoctober. With the AutoCreateDatabase=true option in the same file, Laragon creates a database with the project's name, runs Composer to create the project in C:\laragon\www\myoctober, and sets up http://myoctober.test. Then open the terminal, enter the project directory with cd C:\laragon\www\myoctober and continue from the Install October CMS step above.
See Also
Was this article helpful?