![](https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/07/sound.jpg)
Recently I had a tech test for a job application.
In that test I learned and relearned a lot of things.
The biggest thing I learned was that most guides for simple things like installing PHP are terrible!
So here’s how to install PHP on a Windows 10 Computer.
First download PHP
Go to this address:
https://www.php.net/downloads.php
Then find the windows download of the latest stable version:
![](https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/11/PHP-DOWNLOAD.jpg)
Download the zip file of the appropriate thread safe version.
![](https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/11/PHP-Thread-Safe.jpg)
Extract the file.
Then find the file “php.ini-development” and make a copy of it.
Next rename that file “php.ini” and then open it with notepad.
Find the line “; extension_dir = “ext”” and change it to “extension_dir = “ext””.
If you want to enable some other extensions like sqlite3 you can find them by searching for “extension=”.
Now rename the folder to “PHP8” (replace 8 with whatever version number php you downloaded (no decimals!)) and move it to “C:\” on your computer.
Now we need to make sure your computer knows where to find it, so search “variables” on your start menu and you’l find “Edit the system environment variables”.
![](https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/11/variable.jpg)
In the system variables find “Path” and edit it.
![](https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/11/path.jpg)
Now finally simply add a new variable “C:\PHP8” (or whatever version PHP you downloaded).
![](https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/11/new-path.jpg)
To test that everything works simply open your command prompt and input “php -v” to check your PHP version.
![](https://davidstockdalescrapcode.co.uk/wp-content/uploads/2021/11/php-version.jpg)
And voilà! You have PHP!