How to use PHP8 for App Service Windows

Posted by

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

Note that official support for PHP 8 will only be available on Linux, as a result of this App Service will only support PHP 8 on Apps Service Linux instances. For additional information on this topic: PHP on App Servicephp.internals: Microsoft Support of PHP on Windows.


This article will demonstrate on how to use PHP 8 for App Service Windows, since there would be no official support from Microsoft for it, please use at your own risk.


Generally, we are following this post: How to use a Custom PHP runtime for App Service Windows - ( to download a custom PHP runtime and map Handler for it.


1. Create a new Web app for Windows using any available Runtime stack for Windows.



2. After the creation complete, go to Kudu site from Azure Portal:



3. Create a new directory and download the PHP runtime(Non Thread Safe Version) from PHP For Windows: Binaries and sources Releases and extract it, in this demo, we use php 8.2.1, the output is as below:



mkdir php
curl -o php\
cd php






4. Go to Path mappings in configuration. Add a new handler mapping. The extension is "*.php", the Script processor is "C:\home\php\php-cgi.exe". Then save it. All the configuration is done.



5. To verify it, we can create an "index.php" file under C:\home\site\wwwroot with below content. The result would look like as below:







I hope you enjoy it.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.