Install PHP on windows system

By CodersDrive
16-Jun-2020
Php

In this article you will learn how to install PHP on Windows system and how to configure it with basic extensions and minimum configuration settings.

Install PHP on Windows 10 systems

To download the latest version of PHP Click here. There you can see different versions of PHP. It is suggestible to always download the stable version. First make choice to download 'Thread Safe' or 'Non Thread Safe', in general always download 'Thread safe' version unless you use 'FastCGI'.

  • Extarct to 'C:\' drive to a folder C:\php7.3 with it's version.
  • Rename php.ini-development to php.ini.
  • Edit the php.ini file using any editor and do the following changes and save.
    • Increase memory_limit from '128M' to '1G' if you use 'composer' for dependency manager as it needs more space.
    • Enable to load extensions by uncommenting ;extension_dir = "ext" (uncommenting means remove ';' at the begining) to become like this extension_dir = "ext".
    • Also enable the following extensions by uncommenting them, which are minimum required for any project.
      • extension=php_gd2.dll
      • extension=php_curl.dll
      • extension=php_mbstring.dll
      • extension=php_openssl.dll
      • extension=php_pdo_mysql.dll
      • extension=php_pdo_sqlite.dll
      • extension=php_sockets.dll
  • By adding C:\php7.3 to system PATH we can enable global use of 'Php' from command line like 'cmd' and 'PowerShell'.
  • If an error 'VCRUNTIME140.DLL was not found' is encountered while using 'php' commands download and install Visual C++ Redistributable for Visual Studio 2015.

Now you can verify it's installtion using the following command. Which shows the "PHP" version installed, if you get this message as shown below means you have successfully installed "PHP" on your Windows system.

C:\User\Home>php -v
Install php on windows10

Php Windows

Search blog..!

Connect with us