Author & Developer
This setup gives full control, better performance, and real-world server experience for Laravel developers.
Most beginners use XAMPP for Laravel because it bundles everything: PHP, Apache, and MySQL. But XAMPP can be heavy and less flexible. I wanted full control over my development environment, so I installed PHP, Apache, and MySQL manually.
This guide explains step by step how to:
extension=curl extension=fileinfo extension=gd extension=gettext extension=intl extension=mbstring extension=exif ; Must be after mbstring as it depends on it extension=mysqli extension=openssl extension=pdo_mysql extension=pdo_odbc extension=pdo_pgsql extension=pdo_sqlite extension=pgsql extension=sodium extension=sqlite3 extension=xsl extension=zip
Copy your PHP installation path for example:
C:\Server\php
C:\Server\php
Open Terminal:
php -v PHP 8.3.22 ...
If you see the version then it works.
Edit C:\Server\Apache24\conf\httpd.conf and add:
# PHP Setup
LoadModule php_module "C:/Server/php/php8apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:/Server/php"
DocumentRoot "C:/Server/Apache24/htdocs"
<Directory "C:/Server/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
The htdocs folder contains index.html by default.
cd C:\Server\Apache24\bin
httpd.exe -k install
httpd.exe -k start
http://localhost
Congratulations!
If you see “It Works!” in your browser, Apache and PHP are working correctly. You can now move on to running PHP or Laravel projects.
If you want to start and restart the Apache follow the below commands.
httpd.exe -k stop
httpd.exe -k restart
composer create-project laravel/laravel myproject
Download the official MySQL installer:
👉 MySQL Installer
MySQL will be installed as a Windows service — no need to move it to the Server folder.
Copy your MySQL installation path for example:
C:\Program Files\MySQL\MySQL Server 8.0\bin
C:\Program Files\MySQL\MySQL Server 8.0\bin
CREATE DATABASE laravel_db;
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel_db DB_USERNAME=root DB_PASSWORD=yourpassword
If this guide helped you, don’t forget to share it with your friends and follow me for more tips and tutorials!