Home » PHP » How to Install PHP 7.3 on Windows 10?

How to Install PHP 7.3 on Windows 10?

Here I am giving a step by step example to install PHP 7.3 on Windows 10. But before installing PHP you should install Apache Web Server and to know how to install Apache Web Server on Windows 10, please check the following link Install Apache on Windows 10.

Steps to Install PHP 7.3 on Windows 10 PC

Click on the following link to download PHP 7.3 for Windows and choose the VC15 x64 Thread Safe or VC15 x86 Thread Safe version.

Download PHP 7.3 for Windows

Now extract the ZIP file to a folder, for example, F:\php73.

Open the folder F:\php73 and locate the file php.ini-development and rename it to php.ini.

In the php.ini file, find and modify the extension_dir and set as the following: (Note: change the folder name to your PHP installation folder)

extension_dir = "F:/php73/ext"

Uncomment the following lines to enable.


Add F:\php73 to the PATH variable in Windows by clicking on the My Computer > Properties > Advanced System Settings > Environment Variables as shown in the below image:

Add PHP path to the PATH variable in Windows.

Configure Apache Web Server for PHP 7.3

Open the CONF folder in Apache Web Server installation folder and open the httpd.conf file. Then find and modify the DirectoryIndex as shown below:

DirectoryIndex index.php index.html

Add the following lines to the httpd.conf file:

PHPIniDir "F:/php73"
AddHandler application/x-httpd-php .php
LoadModule php7_module "F:/php73/php7apache2_4.dll"

Now restart the Apache server and test the PHP file. Create a PHP file and add the following line and save it as index.php in the htdocs folder in Apache installation directory.

<?php phpinfo(); ?>

Now double click the file to test. The output is as shown in the featured image of this article.

See also:

2 thoughts on “How to Install PHP 7.3 on Windows 10?”

  1. Hi i tried following your guide and i keep getting this output in windows shell when i input
    php -v

    heres the output

    php : The term 'php' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + php -v
    + ~~~
      + CategoryInfo     : ObjectNotFound: (php:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

    and here is my php.ini file code to show that i put everything in correctly, at least the chunks that are important.

    ; Directory in which the loadable extensions (modules) reside.
    ;extension_dir = "./"
    ; On windows:
    extension_dir = "C:/PHP7/"

    ;extension=exif      ; Must be after mbstring as it depends on it
    ;extension=oci8_12c  ; Use with Oracle Database 12c Instant Client

    ; The MIBS data available in the PHP distribution must be installed.
    ; See http://www.php.net/manual/en/snmp.installation.php


    1. The error you mentioned above is used to occurred, when system PATH variable is not set.

      So please double check if you set the path variable correctly.

Comments are closed.