Install PHP on Windows

Written by Arnaud Lier

PHP is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

In this tutorial, you will install PHP on Windows for local development purposes.

Download PHP binaries and extract the files

Go to the PHP For Windows website and download the Zip in the "VS16 x64 Non Thread Safe" variant for the PHP version of your choice.

Then, create a folder somewhere on your disk, for example C:\php and extract the contents of the archive there.

Configure php.ini

Copy php.ini-development to php.ini to use default settings for a development environment.

Add environment variable

Find "Edit the system environment variables" in the Windows search bar, click on "Environment variables" and double-click on the "PATH" system variable. From there, click on "New" and add the path to your PHP installation, for example C:\php.


In this tutorial, you've learned to set up PHP on Windows. You may want to check out XAMPP which is a nice tool to set up quickly a fairly common stack in the PHP web development world.