How to deploy a PHP website (or application) to IIS Windows Server (2024)

How to deploy a PHP website (or application) to IIS Windows Server (1)The following article uses options that are available starting with the Professional edition and project type.

This tutorial will present the required steps to deploy a PHP website to IIS using Advanced Installer. Internet Information Services, or IIS for short, is a web server that can host websites and web applications that use Microsoft technologies.

  • 1. Adding the PHP and the website resource files
  • 2. Create the Application Pool
  • 3. Create the website in the IIS page
  • 4. Enabling the required IIS Windows Features
  • 5. Launch the website at the end of the installation process
  • 6. Video tutorial - Publish your PHP website on IIS
  • 7. Related Content

1. Adding the PHP and the website resource files

When publishing your PHP application on a Windows Server, we first need to create the installation package. The first step here is to add the website resources to the Files and Folders page.

Because the content of this folder might change during the development process certain files must be included or excluded in the Advanced Installer project, making it difficult to track these changes. You can automate this step by using the folder synchronization feature from Advanced Installer. Aditional information about how synchronized folders work is available in the Working with Synchronized Folders article.

Thus, in the Application Folder view from the Files and Folders page, you can create a regular folder. You can synchronize this folder with the content of the directory where website resources are located. Repeat this step to add the PHP resources files to the installation package.

After this step, your project's Files and Folders view should look as follows:
How to deploy a PHP website (or application) to IIS Windows Server (2)

2. Create the Application Pool

It's good practice to make sure that your websites will run under their application pool; using the Default App Pool might prevent websites from running as expected. To create an application pool for the website you can use the [ New Application Pool ] toolbar button from the IIS view.

3. Create the website in the IIS page

Since the content of the website has been added to the project, it is time to create the website. In the IIS view, you can create a new website using the [ New Web Site ] toolbar button. When prompted, please select the previously created folder from the Application Folder view as the website's physical folder. The website should look like this:
How to deploy a PHP website (or application) to IIS Windows Server (3)

In the Application Mappings tab of the website, you need to use php-cgi.exe ( from the PHP Resources folder ) and select the FastCGI module for handling .php requests. Additional settings for the FastCGI application can be configured for the Global Settings IIS tree node using the Application properties dialog from the FastCGI Settings tab.

Next, we need to enable the Use installed application pool option from the Application Pool tab and select the previously created pool.

Another necessary step to get everything working is to add the index.php document in the Default Document tab of the website. Just create a new document using the [ Add ] button and name it index.php.

4. Enabling the required IIS Windows Features

Starting with Windows Vista, IIS comes out of the box as a set of optional Windows Features.

All we have to do is enable the IIS features using a Windows Feature Bundle. To do this, we simply use the [ New Windows Feature Bundle ] from the Prerequisites view of Advanced Installer. We can select the Target Operating Systems for the windows feature, according to our scenario.

For our particular scenario, we will select only the Default Document feature. Please use the right top filter to search for the Default Document Windows Feature:
How to deploy a PHP website (or application) to IIS Windows Server (4)

How to deploy a PHP website (or application) to IIS Windows Server (5)When a new website is created in the Advanced Installer project, an IIS launch condition is automatically enabled in the Software tab from the Launch Condition page. Since we made sure that IIS is enabled on the target machine, via Windows Features, it is safe to remove the software launch condition.

5. Launch the website at the end of the installation process

If your scenario requires launching the website in a browser at the end of the installation process, you can use the predefined Open URL custom action as a custom action with a sequence. Congratulations, you now have your PHP website hosted to the IIS server!
How to deploy a PHP website (or application) to IIS Windows Server (6)

6. Video tutorial - Publish your PHP website on IIS

7. Related Content

In pretty much the same manner, you can deploy an ASP.NET website to IIS.

How to deploy a PHP website (or application) to IIS Windows Server (2024)

FAQs

How to deploy a PHP website (or application) to IIS Windows Server? ›

Open IIS located under Control Panel -> Administrative Tools -> Internet Information Services (IIS) Manager. Right click Web Service Extensions and select Add a new Web service extension. Enter php as the Extension Name, check Set extension status to Allowed and Click Add.

How to deploy a PHP application in Windows server? ›

Open IIS located under Control Panel -> Administrative Tools -> Internet Information Services (IIS) Manager. Right click Web Service Extensions and select Add a new Web service extension. Enter php as the Extension Name, check Set extension status to Allowed and Click Add.

How to run PHP website on Windows server? ›

Procedure
  1. Connect to the Windows ECS instance. ...
  2. Install IIS. ...
  3. Download a PHP installation package for Windows from the official PHP website. ...
  4. Decompress the PHP installation package to a specific directory.
Sep 9, 2024

How to deploy web application on IIS server? ›

Deploy an app on Microsoft IIS
  1. Create an environment and add Microsoft Internet Information Services (IIS) middleware containers to it.
  2. Import a sample application into Deploy.
  3. Deploy the sample application to the environment that you created.

How to deploy a website with PHP? ›

Deploying PHP applications
  1. Create a PHP deployment target by creating either a PHP dynamic cluster or a PHP server. Verify that you can start the deployment targets. ...
  2. Prepare your PHP application to be deployed. Your PHP application consists of an archive file and optional setup or clean-up scripts.

How can I host my PHP website? ›

How to Host PHP Websites: 9 Steps
  1. Choose a Hosting Provider. The first step is to choose a hosting provider that offers the type of hosting that best suits your website's needs. ...
  2. Choose a Hosting Plan. ...
  3. Install a Web Server. ...
  4. Install PHP. ...
  5. Set Up a Database. ...
  6. Install a Control Panel. ...
  7. Configure Security. ...
  8. Upload Your Website.
Feb 29, 2024

Top Articles
Starling Kite: The free debit card for kids - Starling Bank
Access your Apple Arcade gameplay data on all of your devices - Apple Support
Frases para un bendecido domingo: llena tu día con palabras de gratitud y esperanza - Blogfrases
Umbc Baseball Camp
Tmf Saul's Investing Discussions
Jesus Calling December 1 2022
Die Windows GDI+ (Teil 1)
Sissy Transformation Guide | Venus Sissy Training
Tyrunt
Lesson 1 Homework 5.5 Answer Key
Southland Goldendoodles
Xm Tennis Channel
Pvschools Infinite Campus
R/Afkarena
Beau John Maloney Houston Tx
Tcgplayer Store
Craiglist Tulsa Ok
Transfer and Pay with Wells Fargo Online®
Unity - Manual: Scene view navigation
Welcome to GradeBook
Moving Sales Craigslist
Td Small Business Banking Login
Craigslist Appomattox Va
MLB power rankings: Red-hot Chicago Cubs power into September, NL wild-card race
Robeson County Mugshots 2022
Rqi.1Stop
Phoebus uses last-second touchdown to stun Salem for Class 4 football title
Craigslist Lewes Delaware
Xfinity Outage Map Fredericksburg Va
Weldmotor Vehicle.com
Keyn Car Shows
2004 Honda Odyssey Firing Order
Maisons près d'une ville - Štanga - Location de vacances à proximité d'une ville - Štanga | Résultats 201
Town South Swim Club
24 Hour Drive Thru Car Wash Near Me
Airg Com Chat
Rubmaps H
Lil Durk's Brother DThang Killed in Harvey, Illinois, ME Confirms
Teenage Jobs Hiring Immediately
Tendermeetup Login
Movies123.Pick
Back to the Future Part III | Rotten Tomatoes
Chs.mywork
My.lifeway.come/Redeem
062203010
White County
Tlc Africa Deaths 2021
Worland Wy Directions
The Machine 2023 Showtimes Near Roxy Lebanon
Home | General Store and Gas Station | Cressman's General Store | California
Noelleleyva Leaks
Subdomain Finer
Latest Posts
Article information

Author: Arline Emard IV

Last Updated:

Views: 5806

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.