Installing PHP, Go, Node.js, and databases on Windows one .exe at a time, or leaning on bundles like XAMPP and Laragon, will leave you fumbling when you move to Linux or macOS. Getting used to next-next-finish clicks and manual Environment Variables makes the jump to apt on Ubuntu or brew on a Mac painful when you have to work on a server or a new machine. The real problem is not Windows, it is how we manage development packages the conventional way. Switch to Chocolatey and you can install and manage multiple versions of PHP, Go, Node.js, and even a web server with a single CLI command on Windows. It is more flexible, and it trains the terminal muscle memory that works on any operating system.

The comfort-zone trap: bundles and .exe files

On Windows everything feels instant. XAMPP or Laragon gives you PHP and MySQL in one installer. For Go and Node.js we open a browser, find the download page, grab an .msi or .exe, and click through. As long as it is one computer and one project, that flow feels fine.

The shock comes when you touch macOS or Linux. There are no bundles there. php, nginx, golang, and nodejs are installed separately, modular, and fully controlled from the terminal through Homebrew or apt. If your hands only know installer clicks, every new server feels like starting from zero.

Why Chocolatey changes how you work on Windows

Chocolatey is a package manager for Windows. The idea is the same as apt and brew: one command to install, update, and remove software.

  • One entry point for the whole tech stack. No more juggling browser tabs to download installers for PHP, Go, Node.js, or Git. Everything comes from one central repository.
  • Automatic PATH management. No more forgetting to add the bin directory to Environment Variables after a manual install.
  • Side-by-side multi-version support. This matters for full-stack developers who juggle several projects. An old project needs PHP 7.4 while a new one needs PHP 8.3 or 8.4. An old microservice runs on Go 1.21 while a new service uses Go 1.23. A legacy frontend needs Node.js 18 LTS while a new one uses Node.js 22.
  • CLI muscle memory. choco install, choco upgrade, and choco list get your hands and your thinking used to brew install or apt install.

Installing Chocolatey

Open PowerShell as Administrator and run the official install script from the Chocolatey install page. Read the script before running it, as you should with any script from the internet.

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

When it finishes, close and reopen your terminal and check with choco --version.

A full-stack setup in one command

In PowerShell (Administrator), one line is enough to prepare a development machine:

# Base install (PHP, Go, Node.js, Nginx, Git)
choco install php golang nodejs-lts nginx git -y

Multi-version needs are handled with the -m flag, which lets several versions of a package sit side by side:

# Side-by-side versions with --side-by-side (-m)
choco install php --version=8.1.29 -m -y
choco install golang --version=1.22.5 -m -y

One important note: side-by-side support depends on each package, and a command like php on your PATH points to only one location. After installing several versions, check with where php and php -v to make sure the active version is the one you intend.

For Node.js, a more comfortable approach is to combine Chocolatey with a version manager. Install nvm-windows with choco install nvm, then switch versions per project with nvm use. For Go, you can also fetch extra versions with go install golang.org/dl/go1.22.5@latest. Chocolatey lays the foundation, and the version manager handles the switching.

Other everyday commands:

choco list            # installed packages
choco outdated        # packages with newer versions
choco upgrade all -y  # update everything
choco uninstall nginx -y

Ready to move to any OS

Mastering a CLI package manager on Windows is not about showing off. It is an investment in working efficiently. Once typing choco install is second nature, moving to brew install on macOS or apt install on a Linux server is just a matter of changing the first word. You also get a setup you can repeat on a new computer in minutes, with no list of installers to download one by one.

If you still rely on bundled stacks in production, read why you should use IIS instead.

References