How To Install PHP on Windows 10

Installing PHP on Windows can be a hassle for beginners. But fear not; this guide will take you through all the steps you need from the very start.

Updated: 29 Jun, 23 by Susith Nonis 4 Min

List of content you will read in this article:

If you're new to web development and want to learn PHP, you might wonder how to install it on your Windows 10 machine. Don't worry, it's not very difficult, and in this guide, we'll show you how to do it step-by-step.

PHP (Hypertext Preprocessor) is an open-source, server-side scripting language widely used for web development. PHP is easy to learn and use and supports many frameworks, making it one of the most popular programming languages for web development.

Learning PHP can be a great advantage for anyone interested in web development. It offers many opportunities for building web applications, from simple websites to complex e-commerce platforms. So, if you're interested in building dynamic web applications, PHP is a language to consider.

Take the following actions to install PHP on your computer:

Download PHP

First, you must download the PHP installer from the website below. You can download either the 32-bit or 64-bit version, depending on your Windows 10 version.

Official website:

Extract PHP

Once the download is complete, you must extract the PHP files to a folder. You can choose any folder, but we recommend creating a new folder called "PHP" on your C: drive for simplicity.

Add PHP to PATH Environment Variable

After you've extracted PHP, you need to add it to the PATH environment variable. This will allow you to use PHP from any directory in the command prompt. Follow the steps below to complete the task:

  1. Go to Start Menu and search for ‘Environment Variables’.
  2. Click on ‘Edit the system environment variables’.
  3. In the System Properties window, click the ’Environment Variables’ button.
  4. Scroll down under the “System Variables” section and find ‘Path’.
  5. Click on ‘Edit’.
  6. Then click on ‘New’.
  7. Enter the path where you extracted PHP. For example, if you extracted PHP in ‘C:\PHP’, the new path should be ‘C:\PHP’.

Test Installation

Now that PHP is added to the PATH environment variable, it's time to test if it's installed correctly. Open the command prompt and type the following command:

Syntax: php -v

If PHP is installed correctly, you should get an output similar to this:

PHP 8.0.10 (cli) (built: Sep 

7 2021 16:13:58) ( NTS Visual C  

2019 x64)

Copyright (c) The PHP Group

Zend Engine v4.0.10, Copyright (c) Zend Technologies

🔋🔋Experience blazing-fast speeds and unbeatable performance with our Windows VPS service, equipped with cutting-edge technology, perfect for powering your business's online presence.🔋🔋

Configure PHP

PHP is now installed and ready to use, but you'll need to configure it to your liking. Follow the steps below to do it:

  1. Navigate to the PHP folder (e.g., C:\PHP)
  2. Create a new file called ‘php.ini’. You can copy the ‘php.ini-development’ file and rename it to ‘php.ini’.
  3. Open the ‘php.ini’ file.
  4. Configure the PHP settings as per your requirements.

Installing PHP on Windows 10 is easy, and by following these steps, you'll be able to get started with PHP development in no time. Remember to download the correct version of PHP based on your Windows 10 version, add it to the PATH environment variable, test it, and configure it as per your requirements. Good luck!

  • PHP is a popular choice for web development due to its versatility and compatibility with other programming languages.
  • Installing PHP on Windows is easy with pre-packaged bundles like XAMPP or WAMP, which include Apache, MySQL, and the latest version of PHP.
  • The active community of PHP developers provides ample resources for beginners and advanced users, with many popular CMS platforms like WordPress and Drupal built on top of PHP.

People also read: 

To install PHP on a Windows 10 computer, you need to have a web server like Apache or IIS, PHP binaries, and the appropriate Visual C++ runtime libraries. 

Open the Command Prompt and type ‘php -v’. If PHP is installed, you will see the PHP version number and other configuration details.

No, it would be best if you had a web server like Apache or IIS to run PHP applications. If you don't have a web server installed, you can download and install one from the official Apache or Microsoft website.

To configure PHP on Windows 10 for optimal performance, you need to adjust the PHP.ini file settings. Some of the settings you can adjust include memory_limit, max_execution_time, error_reporting, and upload_max_filesize.

Susith Nonis

Susith Nonis

I'm fascinated by the IT world and how the 1's and 0's work. While I venture into the world of Technology, I try to share what I know in the simplest way with you. Not a fan of coffee, a travel addict, and a self-accredited 'master chef'.