Installing PHP 8 for Windows 10

Mon 18th January 2021 By David T. Sadler.

Getting Started

The PHP For Windows site provides pre-built Windows binaries for you to download. Which version you download depends upon two things.

1. Is your system a 64 or 32 bit machine.

2. Are you planning to use IIS or Apache as the web server.

For 64 bit systems the x64 file should be downloaded. If you plan to use IIS then get the Non Thread Safe (NTS) version otherwise use the Thread Safe (TS) version.

The PHP 8 binaries require to have the Visual C++ Redistributable for Visual Studio 2015-2019 be installed as well.

Download and Installation

1. Download the Visual C++ Redistributable for Visual Studio 2015-2019 executable and install it.

2. Download the appropriate PHP 8 Zip archive for your Windows system.

3. Extract the Zip archive into a folder called php in your user folder. This should result in a folder at C:\Users\[username]\php.

Configuring Windows

In order to run the PHP executable from the command line the path to where the Zip archive was extracted to needs to be added to the Windows Path environment variable.

1. Right click on the start menu and select System.

2. Type Control Panel into the search field and select the Control Panel option when it appears.

3. Click System and Security and then the System option.

4. Click Advanced system settings from the left side menu to bring up a dialog box.

5. Select the Advanced tab and then click Environment Variables.

6. Select the Path option from the User variables list and click Edit.

7. Click New and enter the path to where you extracted the Zip archive. This should be C:\Users\[username]\php. You can also click Browse instead and navigate to the folder.

8. Click OK to close the Edit environment variable dialog.

9. Click OK again to close the Environment Variables dialog.

10. Click OK for a third time to close the System Properties dialog.

Checking Installation

Open up either PowerShell or the Command Prompt and enter php -v to verify that PHP was installed correctly. You should see output similar to that shown below.

C:\Users\dev>php -v

PHP 8.0.1 (cli) (built: Jan 5 2021 23:43:33) ( NTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.1, Copyright (c) Zend Technologies


PHP For Windows.PHP - Read More Posts.

I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.



The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright © 2021 David T. Sadler.

Return to Homepage.