Guide: Windows Server 2025
Install IIS, PHP and MySQL on Windows Server 2025
A fresh Windows Server 2025 can run PHP websites very well, but a working stack takes a dozen separate steps: IIS roles, URL Rewrite, the right PHP build, the Visual C++ runtime, FastCGI, a production php.ini, MySQL and the permissions between them. Here is every step, and how ServerMaid does the lot in one click, verified and secured.
Server setup £99 £49.50 per server for twelve months, with Windows Server 2019, 2022 and 2025 supported. 30-day money-back promise.
The manual route
Installing the stack by hand on Windows Server 2025
These are the steps a Windows web engineer follows. Each one is simple on its own; the trouble is the number of them, and the gaps between them where a site breaks later.
- Install Windows updates first. Run Windows Update until nothing is left and restart. Building on a half-patched server means a surprise restart in the middle of the next step.
- Add the IIS roles. In an elevated PowerShell:
Install-WindowsFeature Web-Server,Web-CGI -IncludeManagementTools.Web-CGIis the FastCGI support PHP runs through; leave out features you will not use, such as WebDAV and directory browsing. - Install URL Rewrite. It is a separate download from Microsoft and not a Windows feature. WordPress permalinks, Laravel routes and HTTPS redirects all depend on it.
- Install the Visual C++ runtime. Windows builds of PHP need the current Visual C++ 2015-2022 redistributable (x64). Without it the first page load fails with "FastCGI process exited unexpectedly".
- Download PHP. From windows.php.net, take the Non Thread Safe x64 zip of the line you want (NTS is the build for FastCGI), check its SHA-256 against the published value and unpack it to a folder such as
C:\PHP\8.4. - Create php.ini. Copy
php.ini-productiontophp.ini, setextension_dir, enable the extensions your applications need (mysqli, pdo_mysql, curl, mbstring, openssl, intl, gd, fileinfo), turn on OPcache, and setcgi.force_redirect = 0,cgi.fix_pathinfo = 1andfastcgi.impersonate = 1. Move session, upload and temp folders out of the PHP folder. - Register PHP with IIS. Add a FastCGI application for
php-cgi.exewith sensible instance limits, request recycling and timeouts, setPHPRCto the PHP folder, and map*.phpto it with a handler mapping. Addindex.phpto the default documents. See configuring PHP FastCGI on IIS for the settings that matter. - Install MySQL 8.4 LTS. Use Oracle's signed installer, bind it to localhost only, set a long root password, remove anonymous accounts and remote root, and create one database and one account per website, with rights on that database only.
- Create the website. A folder outside
C:\inetpub\wwwroot, its own application pool, read access for the pool identity and write access only where the application uploads, and a host-name binding. Retire the Default Web Site. - Add SSL and open the firewall. Get a certificate, bind HTTPS, redirect HTTP to HTTPS, open ports 80 and 443, and keep 3306 closed.
- Test it. A PHP page that connects to the database, over HTTPS, from outside the server. Then write down everything you did, because in a year you will need to do it again.
Why it goes wrong
The same job, by hand and with ServerMaid
By hand
- A thread-safe PHP build downloaded by mistake, or no Visual C++ runtime
- php.ini edited in place, then overwritten by the next PHP update
- FastCGI left on defaults, so long requests time out and workers never recycle
- MySQL listening on every address with a short root password
- Every website sharing one application pool and one database account
- Steps remembered, not recorded, so the next server is built differently
With ServerMaid
- The NTS build of the PHP line you pick, verified against its SHA-256, with the runtime it needs
- A managed php.ini block, journaled and reversible, that survives updates
- FastCGI registered with limits, recycling, timeouts and PHPRC set
- MySQL 8.4 LTS or MariaDB 11.8 LTS on localhost only, root password in an encrypted vault
- Each website with its own folder, pool, database, account and free SSL
- The whole build recorded, verified by tests, and repeatable on the next server
How it works
A fresh Windows Server 2025 to a verified web server
Install ServerMaid
Connect to the new server over Remote Desktop, install ServerMaid and add your licence. It checks the server first: edition, updates, disk space and what is already installed.
Choose, then build
Quick Setup takes the recommended choices (PHP 8.4, MySQL 8.4 LTS). Advanced Setup lets you pick the PHP line, the database engine and the Remote Desktop addresses. Every step is shown before it runs.
Proved, not assumed
When the build finishes, ServerMaid tests it: PHP answers through FastCGI, the database refuses outside connections, the firewall and security baseline are in force. Then add your first website.
What is different on Windows Server 2025
The IIS, PHP and MySQL steps are the same on 2019, 2022 and 2025; PHP's Windows builds and MySQL 8.4 support all three. What changes on 2025 is mostly around the edges: newer defaults for TLS and SMB, hotpatching on Azure editions, and a newer IIS build. ServerMaid supports Windows Server 2019, 2022 and 2025 with the same design, so a site moves between them without surprises.
If your old sites are on Windows Server 2012 or 2016, build the 2025 server first, then move the websites across.
Questions about IIS, PHP and MySQL on Windows Server 2025
Which PHP build do I need for IIS?
The Non Thread Safe (NTS) x64 build. IIS runs PHP through FastCGI, where each worker handles one request at a time, so the thread-safe build only costs performance.
Do I need the Web Platform Installer?
No. Microsoft retired it at the end of 2022 and its PHP packages are years out of date. Install PHP from windows.php.net, or let ServerMaid fetch and verify the current release.
MySQL or MariaDB on Windows Server 2025?
Either works. MySQL 8.4 LTS and MariaDB 11.8 LTS are both long-term releases; ServerMaid lets you choose in Setup and secures either one the same way.
Can I run several PHP versions?
Yes. With the Multiple PHP lines module you can run PHP 8.4 and 8.5 (or 8.3 for an older application) side by side and choose one per website.
Does this work on Windows Server Core?
ServerMaid needs the Desktop Experience, because it is a Windows application you run over Remote Desktop. Most VPS providers install Desktop Experience by default.
What does it cost?
Server setup is £99 £49.50 per server for twelve months; add Websites and SSL (£79 £39.50) for unlimited websites with free SSL. See pricing.
Windows Server 2025 to a production web server, in one click
IIS, PHP, MySQL, SSL and security done the way a specialist would, then proved by tests.