Background paper texture
phpnginxmysql

Laragon Paid?

Laragon pay? XAMPP is complicated? Let me teach you how to setup PHP, MySQL, NGINX manually on Windows, so that coding gets cooler!

Author avatar

Peter Shaan

May 22, 2025


125 Views

This time we will discuss the latest drama of the PHP world - yep, Laragon is now PAID. Sad? Relax, I have a solution. Here we will learn how to coding PHP + Laravel without Laragon or XAMPP, natively on Windows!

Why leave it behind?

Who is coding Laravel but doesn't know how to install PHP manually? I used to do that too. But since Laragon started to license license unclear, it's time we go back to basics. And... this is also great for those who want to deploy manually to a VPS/host!


Step 0 - First Uninstall All “Instant Tools”

Make sure all files and backups are safe before uninstalling! (move from C:/laragon/www or C:/xampp/htdocs to another place).

Dump database laragon (right click → export -> dump database)

  1. Uninstall via Control Panel → Programs → Programs & Features
  2. Delete the C:/laragon or C:/xampp folder
  3. Delete PATH php, mysql, nginx if they are still stuck in the environment variable

The point is in this initial step to make your terminal if you type php -v or mysql -v it doesn't exist.


Step 1 - Download All Requirements

🐘 1. PHP

  • Link: windows.php.net
  • Choose version Thread Safe
  • Extract to C:/php and rename the folder to php to make it easy

❓ Thread Safe vs Non?
Thread Safe for web servers like Apache/NGINX, Non Thread Safe suitable for CLI only.

🐬 2. MySQL

  • Link: dev.mysql.com
  • Choose the Installer version
  • Follow the setup wizard, create a root password and remember not to forget it.

MySQL Installer

🔄 3. NGINX


Step 2 — Setup PATH & Environment

  1. Add C:/php and C:\Program Files\MySQL\MySQL Server 8.0\bin to PATH ENVIRONMENT VARIABLE

    • Open Search → Environment Variables
    • Edit Path and add C:/php & C:\Program Files\MySQL\MySQL Server 8.0\bin

PHP & MYSQL

  1. Dont forget rename in folder php on windows C:/php php.ini.development to php.ini, then activate the required extension, usually as shown in the image below:
  1. Test it in terminal
php -v
mysql -v

And congratulations, you have successfully installed PHP and MySQL on Windows without Laragon or XAMPP! 🎉 up to this point you can run your laravel project with the usual commands

php artisan serve

and in the database just connect with dbeaver, the username and password that were initially used when installing the MySQL server so that with dbeaver access is easy and no longer requires a terminal.

Step 3: Install NGINX and working localhost (optional)

Up to Step 2, this tutorial is actually finished, but to make it similar to Laragon running on localhost, we can use nginx.

  1. Open folder C:/nginx/conf/nginx.conf and edit like this :
server {
    listen 80;
    server_name localhost;

    root C:/Users/Admin/Documents/GitHub/ecms/public;  # Ganti dengan path project kamu
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

⚠️ Change C:/Users/Admin/Documents/GitHub/ecms/public with your project path folder

  1. Open terminal and run PHP FastCGI
C:\php\php-cgi.exe -b 127.0.0.1:9000
  1. Run NGINX by right click in C:/nginx/nginx.exe and choose Run as administrator

  2. Open browser and access http://localhost to see the result

Bonus: Automatic Run when Windows Run

So If we not want longer need to run nginx, and run php cgi in the terminal, we need to do something to the windows services so that they can automatically run in the background.

  1. Download NSSM and extract it to C:/nssm
  2. Run the command in Terminal
cd C:\nssm\win64
nssm install php-cgi
# pilih C:\php\php-cgi.exe -b 127.0.0.1:9000

nssm install nginx
# pilih C:\nginx\nginx.exe

if cannot nssm install, try with .\nssm.exe install php-cgi/nginx

  1. Then Select Path for php cgi it needs the command -b 127.0.0.1:9000 and for nginx it is not necessary

Done, Goodbye Laragon

Now you can code PHP and Laravel without Laragon or XAMPP! 🎉, every time you start Windows, you can use localhost, and if you want to deploy, you are more prepared because you also understand basic things like this

I'm already free from instant tools and you can too