How to Install PHP in Windows 10/1113 June 2023
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft’s ASP.
PHP is an acronym for “PHP: Hypertext Preprocessor”. It is a widely-used, open source scripting language. PHP scripts are executed on the server. It is free to download and use.
PHP is an amazing and popular language. It is powerful enough to be at the core of the biggest blogging system on the web (WordPress). It is deep enough to run large social networks. It is also easy enough to be a beginner’s first server side language.
PHP Installation in Windows
Download PHP 8 – Similarly, depending on your system build download the Thread Safe version of PHP.
Now we install PHP 8. To do that, similarly, move the downloaded and extracted PHP 8 binary files to the C drive. In my case, I renamed php-8.2.4 to php folder.
Now Copy the PHP 8 home path i.e C:\php and set it into your machine environment variable just like above “apache setup”.
Open the command prompt and type
php -v to check whether the path is set correctly or not. If the PHP path is set correctly, it will print the PHP version.
Go to the PHP home directory C:\php, and you will find two configuration files
php.ini-production. Create a copy of
php.ini-development and rename it to
How to run PHP Code via inbuilt PHP server
PHP provides a built-in web server, which you can launch by navigating to a folder and running the PHP executable with an
-S parameter to set the
localhost port. For example:
cd myproject //folder name where your php files stored php -S localhost:8000
You can then view PHP pages in a browser at http://localhost:8000.
This may be adequate for quick tests, but your live server will use Apache or similar web server software. Emulating that environment as closely as possible permits more advanced customization and should prevent development errors.
Use PHP Interactive Shell
Just type php -a on your command prompt.
Method 3 – Set up Web Server on your own PC (Manually)
If you want install and configure manually, Please visit this article : How to install Apache 2.4 and PHP 8 on a Windows
Hi, I’m Harshvardhan Mishra. Tech enthusiast and IT professional with a B.Tech in IT, PG Diploma in IoT from CDAC, and 6 years of industry experience. Founder of HVM Smart Solutions, blending technology for real-world solutions. As a passionate technical author, I simplify complex concepts for diverse audiences. Let’s connect and explore the tech world together!
If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee!