input license here

How to Install PHP in Windows Server 2022


One of the best on Windows Server 2022 is a web platform installer (WPI), using this you can install PHP with Internet Information Services (IIS). However, there are other methods to install PHP on your Windows Server 2022 but in this article, BKNS will use WPI to do it as it takes significantly less time than its alternatives. it.


In this article, we will guide you through the installation process PHP on your system using IIS.




  1. In your Windows Server 2022, open Dashboard.




  2. In Programs and Features, you will see Turn Windows Features on or off , click it.


    A pop-up window will open.




The Add Roles and Features Wizard will launch with the “Before you begin”.


Select option "Skip this page by default” to skip in the future.


Continue by pressing “Next“.




  1. Select the radio button “Role-based or feature-based installation” since running the PHP code


    on your Windows 2022 server in a role-based installation.



  2. You will see in the image below that IIS is installed in our system.


    However, in your case you need to select Server CGI in Role services.



  3. Click Web Server (IIS) then come Web Server and then Application development.


    Check the box next to CGI , if it hasn't already.



Windows Server 2022




  1. Click ” Next ", in Features.




  2. In the window Confirmation, click Install node to install CGI in IIS.





Now download WebPI using this link and then install it, depending on your system bit. Here!





  1. Now Install WebPlatformInstaller_x64_en-US.msi that we have downloaded.




  2. After installation you can see Microsoft Web Platform Installer in the start menu. Open it.



  3. The Web Platform Installer window opens.

    Go to section Products and find php.




Instructions for installing php in Windows Server



13. Find PHP 8.0.0 (x64) or anything above it then click the . button Add next to it.


And then click the button Install and agree to the terms to install PHP.



Windows Server Guide


However, you will have to remember that this can lead to the installation of components that you did not select . And all of you may see failed installation message PHP Manager for IIS but you can still use text editor and command line to make changes in configuration.


You can also check the PHP settings. Use the following code to create a test file:


< ? php phpinfo () ; ? >


I created a file called phpinfo.php to test PHP.


Now open your browser and run this file through it. Eg : http: //localhost/phpinfo.php or your serverip/phpinfo.php.


You should see something like or similar to this if the installation was successful:


Windows Server


And that's all. You have successfully installed PHP in your Windows Server 2022. Now you can go ahead and use to install applications like WordPress, Joomla… Good luck!


Explore more:




Related Posts
Diệp Quân
Nguyen Manh Cuong is the author and founder of the vmwareplayerfree blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Sticky