Installing PHP on Windows 10 for Web Development Enthusiasts Complete Guide

Published June 8, 2023

Installing PHP on Windows 10 for Web Development Enthusiasts Complete Guide

PHP is a popular scripting language widely used for web development. Installing PHP on your Windows 10 operating system allows you to run and test PHP-based applications locally. In this step-by-step guide, we will walk you through the process of installing PHP on Windows 10, ensuring you have everything you need to get started with PHP development.

Step 1: Download PHP:

  1. Open your preferred web browser and go to the official PHP website (
  2. On the downloads page, you will see the latest stable PHP version. Choose the Windows ZIP package suitable for your system architecture (32-bit or 64-bit). It’s recommended to select the thread-safe version.
  3. Click on the download link to start the download.

Step 2: Extract PHP Files:

  1. Once the download is complete, navigate to the location where you saved the PHP ZIP file.
  2. Right-click the ZIP file and select “Extract All” to extract the contents into a new folder.
  3. Choose a location for the extracted files, such as “C:\php”. Click the “Extract” button.

Step 3: Configure PHP:

  1. Open the extracted folder and locate the “php.ini-development” file. Rename it to “php.ini”.
  2. Open the “php.ini” file in a text editor of your choice (e.g., Notepad).
  3. Search for the line that begins with “extension_dir” and uncomment it by removing the semicolon at the beginning of the line.
  4. Set the value of “extension_dir” to the path where your PHP extensions will be located. For example, if you want to use the default extensions folder, the line should look like this: extension_dir = "ext".
  5. Save the changes and close the file.

Step 4: Set Up Environment Variables:

  1. Open the Start menu and search for “Environment Variables” and click on “Edit the system environment variables”.
  2. In the “System Properties” window, click on the “Environment Variables” button.
  3. In the “System Variables” section, scroll down and find the “Path” variable. Select it and click on the “Edit” button.
  4. Click the “New” button and add the path to your PHP folder (e.g., “C:\php”).
  5. Click “OK” to save the changes.

Step 5: Test PHP Installation:

  1. Open a command prompt by pressing Windows Key + R, typing “cmd,” and pressing Enter.
  2. In the command prompt, type “php -v” and press Enter. This command will display the PHP version if the installation was successful.

Congratulations! You have successfully installed PHP on your Windows 10 system. You can now start developing and running PHP applications locally.

Installing PHP on Windows 10 allows you to set up a local development environment for PHP-based web applications. By following the step-by-step guide outlined above, you can easily install PHP on your Windows 10 system and begin your PHP development journey. Enjoy coding in PHP and exploring the vast possibilities it offers in web development.

Installing PHP on Windows 10 (FAQ)


Can I install PHP on Windows 10 Home edition?

Yes, you can install PHP on Windows 10 Home edition. The installation process is the same regardless of the Windows 10 edition you have.

Is it necessary to install a web server like Apache or Nginx separately?

While PHP itself is a scripting language, it requires a web server to run PHP scripts. You will need to install a web server like Apache or Nginx separately to serve PHP files locally on your Windows 10 system.

Do I need to install any additional software before installing PHP?

Yes, before installing PHP, you need to have a web server (like Apache or Nginx) and a database server (like MySQL or MariaDB) installed on your Windows 10 system. These components work together to create a complete web development environment.

Can I use XAMPP or WAMP instead of installing PHP manually?

Yes, you have the option to use pre-packaged solutions like XAMPP or WAMP, which provide a bundled installation of PHP, Apache, and MySQL. These packages simplify the installation process and provide an all-in-one solution for PHP development on Windows 10.