DEV Community

Amulya
Amulya

Posted on • Updated on

How to Download & Install PHP 7.4.6 Manually on Windows 10

  • To download php 7.4.6, launch your prefered web browser and pull up http://php.net and click the Downloads button
  • Then click Windows Downloads
  • Check your system type (64 bit/ 32 bit) by pressing (Windows + Pause/Break) togather.
  • Under thread safe section click the zip link to start download for your specific system type.
  • Once download completes, unzip the PHP zip folder
  • Copy this unzipped folder and paste in your desired drive (C or D)
  • Rename the folder name
  • Open this php folder and look for php.ini-development file
  • Make a copy of this file and rename it to php.ini
  • Open php.ini file with your prefered text editor
  • Uncomment PHPIniDir "ext" and save this file

Learn PHP & MySQL

LEARN PHP and MySQL from Highly Rated Experts one-to-one $5 an hour.

SET PHP to PATH

Copy the php folder path with your prefered drive and add it to system environment variable path

Verify php -version with your command prompt

php -version

Test PHP Development Server

  • Create a folder on your desktop
  • Create a php file in this new folder
  • Type <?php phpinfo() ?> and save it
  • Navigate to this folder with your command prompt
  • Run php development server php -S 127.0.0.1:8080
  • Launch your browser and try to pull up localhost:8080

Additional Resources

If you would like to upgrade your PHP to PHP 8 on your windows and also would like to set up WordPress theme development environment; follow the links below.

Install PHP 8 on Windows 10

WordPress Theme Development

Top comments (4)

Collapse
 
huncyrus profile image
huncyrus

Did you consider to use either the Linux subsystem or docker or vagrant instead of polluting your host machine?

Collapse
 
amulya_shahi profile image
Amulya

Not really.. How can I fix it now? Should I reset my windows 10? Thanks!

Collapse
 
huncyrus profile image
huncyrus

You don't have to fix anything, I was just curious. Totally fine to follow all your steps - since they are total correct - to start working with and explore.

[tl;dr]
The idea is that, for PHP you can have a container, what has everything what you need for your project and encapsulate it, so it's easy to move, replace or destroy, without have the trouble of cleanup.

Usually people using VirtualBox, Vagrant or Docker for it. Both virtualization on different level. In VirtualBox you could have a fully functional - even desktop based - linux, without any multiboot fuzz, with vagrant you could have a headless box what easy to use from IntelliJ software (e.g.: from PHPStorm) and docker is for having a super lightweight container top on your own shell.

There are plenty of good article, worth to read them and discover that part of the world also.
[/tl;dr]

Thread Thread
 
amulya_shahi profile image
Amulya

I like Docker personally.. I think Windows 10 with Visual Studio is going in the same direction as long as you want to deploy your app on azure.

I think I must explore containers and virtualisation.