Install PHP on Windows
Step 1. Download PHP
Download the ZIP from the official site.
Direct Link: php-8.3.12-Win32-vs16-x64.zip
(If you decide to download a later version, go with x64 Thread Safe
.)
Step 2. Unzip It
Unzip this file to C:\php
Step 2. Add it to Path
The php directory must be in your “PATH” system environment variable.
1. Search for “Environment Variables”
2. Click “Environment Variables”
3. Open the PATH variable
4. Add the PHP directory
Step 3. Check It
Open a new cmd
shell (don’t re-use an existing shell window) and run this:
$ php -v
You will see something like this:
PHP 8.3.12 (cli) (built: Jul 2 2024 14:10:14) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.9, Copyright (c) Zend Technologies with Zend OPcache v8.3.12, Copyright (c), by Zend Technologies
Great!