memoru

How To: Install PHP on Windows

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 in your file system, 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.