Problem: WordPress on IIS

WordPress on IIS without the 404s, permission errors and expiring certificates

WordPress runs perfectly well on Windows Server. The trouble is everything around it: permalinks that 404 because there is no .htaccess, updates that fail with "could not create directory", a FastCGI error on the first page load, a database listening on every interface with the root account, and a certificate to buy every year. ServerMaid's website wizard sets all of it up correctly from one form, and one checkbox from the WordPress module (included in every Agency licence) installs the latest WordPress into the site, already hardened.

Server setup £99, £49.50 Websites and SSL £79 £39.50 and the WordPress module £49 £24.50: per server for twelve months, unlimited websites. 30-day money-back promise.

The five things that go wrong

  • Pretty permalinks return 404. WordPress writes rewrite rules to .htaccess, which IIS ignores. Without the equivalent URL Rewrite rules in web.config, every page but the home page is missing.
  • Updates and uploads fail. "Installation failed: could not create directory" means the application pool identity cannot write where WordPress needs to. The usual fix on forums, giving Everyone full control, is how sites get compromised.
  • PHP will not start. "FastCGI process exited unexpectedly" on the first load is a missing Visual C++ runtime, and the next surprise is a php.ini with upload and memory limits far below what a theme installer needs.
  • The database is wide open. A default MySQL install listens on every interface, root has a blank or shared password, and WordPress is pointed at root because it was quickest.
  • SSL is a yearly chore. A certificate bought, installed by hand, and forgotten until the browser warns visitors away.

None of these is hard for a specialist. All of them are easy to get wrong when you are doing it once, from a search result, on a Friday afternoon.

What ServerMaid does

A WordPress site from one form

Permalinks that work

The website wizard applies a WordPress rewrite profile: the front-controller rules WordPress expects, written as URL Rewrite rules, with the HTTPS redirect first. Laravel and other front-controller applications have their own profile.

Exact folder permissions

Nothing is ever granted to Everyone or Users. The site's application pool gets read on its folder and modify only on wwwroot, temp and logs, so WordPress can update itself and upload media, and nothing else can be written.

PHP ready for WordPress

An official PHP build verified against its published fingerprint, the Visual C++ runtime it needs, OPcache on, the extensions WordPress uses, and a production php.ini sized for your server, so themes and plugins install without hitting a limit.

A database of its own

MySQL or MariaDB bound to localhost with a secured root. Each website gets its own schema and an account with rights on that schema only, with the credentials written to the site's private folder, never into wwwroot.

Free SSL*, renewed for you

A Let's Encrypt certificate is ordered when the site is created, bound in IIS with an HTTPS redirect and renewed by a scheduled task. How the certificate works.

Staging and backups

Clone the site and its database to a staging hostname, hidden from search engines, to try a theme or a plugin update first. Scheduled backups are proven by opening every archive and replaying every database dump.

* Free SSL certificates need the Websites and SSL module (included in Agency and Enterprise licences) on a licence within its twelve-month period. Certificates come from Let's Encrypt; new websites get one while the licence is in date, and certificates already issued keep renewing.

One click installs WordPress, already locked down

The add-website form has a checkbox: Install WordPress (latest) into this site. Tick it and ServerMaid does what a specialist would do for a WordPress install on Windows Server, in order:

  1. Downloads the current WordPress release straight from wordpress.org and checks it against wordpress.org's own checksum before unpacking it into the site.
  2. Writes wp-config.php connected to the site's own database and database user; that user can reach only its own database.
  3. Generates the security salts and keys locally, unique to this site, rather than copying them from a web page.
  4. Sets pretty permalinks, with the IIS URL Rewrite rules WordPress needs already in place.
  5. Hands over: you open the site in a browser and choose the admin user and password. Nothing is chosen for you.

The same install is available from the command line with the --wordpress switch. It needs the WordPress module (included in every Agency licence), which works inside the Websites and SSL module.

The hardening applied to every install

  • The theme and plugin file editor in the dashboard is switched off (DISALLOW_FILE_EDIT), so a stolen admin login cannot edit PHP on the server.
  • WordPress minor security releases install themselves.
  • Admin pages are forced over HTTPS when the site has its certificate.
  • Debug output is off and unfiltered HTML is off.
  • PHP cannot run from the uploads folder: a named URL Rewrite rule in the site's web.config returns 403 for any .php file under wp-content/uploads, which closes the most common route for a malicious upload.
  • Direct requests to wp-config.php, xmlrpc.php, readme.html, license.txt and any .git or .svn folder are refused.
  • wp-config.php is read-only for the website's own application-pool identity.
  • The sample Hello Dolly plugin is not installed.
  • ServerMaid checks that Users, Everyone and Authenticated Users have no rights on the site folder.

What is still yours to do

Third-party plugins and themes remain your responsibility, on any host. Install them only from wordpress.org, keep them updated (a staging copy is the safe place to try an update first), and delete anything you are not using rather than leaving it deactivated. ServerMaid does not scan plugin code; it makes sure a bad plugin has as little to work with as possible.

WordPress security on Windows Server

What ServerMaid does differently to keep WordPress users safe

WordPress security on Windows Server is mostly about what is left open around the application. A typical manual or shared-hosting install leaves the items on the left open; ServerMaid's WordPress module (included in every Agency licence) closes them by default. Each row on the right answers the same row on the left.

A typical manual or shared-hosting install

  • File editor in the dashboard: usually on
  • PHP in the uploads folder: usually runs
  • xmlrpc.php: open to brute force
  • wp-config.php: readable by the web user
  • Database account: often shared root, or one account for every site
  • Salts and keys: copied from the web
  • Admin over HTTP: common
  • Core security releases: left to the owner
  • Server level: one account and one folder for every site
  • Plugins and themes: nobody checks

A WordPress site built by ServerMaid

  • File editor: off
  • PHP in uploads: refused with a 403
  • xmlrpc.php: refused
  • wp-config.php: read-only for the site's own pool identity, and direct requests refused
  • Database account: its own account, able to reach only its own database
  • Salts and keys: generated locally, unique per site
  • Admin over HTTP: forced to HTTPS when the site has SSL*
  • Core security releases: minor releases install themselves
  • Server level: each site its own application pool, folder and permissions, on a hardened IIS with a firewall and Remote Desktop locked to your locations, with daily verified backups from the Backups module
  • Plugins and themes: still your call. wordpress.org only, keep them updated, delete what you do not use; ServerMaid does not scan plugin code

The full list of what the one-click install applies is above; the rest of the server baseline is on the Windows Server security hardening page.

Moving an existing WordPress site over

Add the website in ServerMaid first, with its domain and www hostname. That creates the folders, application pool, rewrite rules, database and account. Copy your WordPress files into the site's wwwroot, import your database dump into the new schema, and put the credentials from the site's private folder into wp-config.php. Point the domain at the server, press Repair, and the certificate is issued as soon as the DNS check passes. The old site keeps serving until you move the DNS, so there is no gap.

Questions about WordPress on Windows Server

Does WordPress run properly on IIS?

Yes. ServerMaid's website wizard applies a WordPress rewrite profile for pretty permalinks, PHP gets the extensions WordPress needs, and the database account has rights on its own schema only. Laravel and other front-controller applications have their own profile.

Is WordPress slower on Windows than on Linux?

Not when PHP is set up properly. Most slow WordPress-on-IIS stories come from FastCGI without recycling or OPcache switched off. ServerMaid registers FastCGI with instance limits and recycling and turns OPcache on, which is what a specialist would do on either platform.

What about plugins that write their own .htaccess rules?

The core permalink rules are handled by the rewrite profile. A plugin that adds its own Apache rules, such as a caching or security plugin, needs the equivalent written as URL Rewrite rules; the plugin's documentation usually provides them for IIS.

Can I host several WordPress sites on one server?

Yes, as many as the server can serve. Each gets its own folders, application pool, database, account and certificate, so one compromised site cannot reach another's files or data. The Websites and SSL module covers unlimited websites on the server, and the WordPress module (included in every Agency licence) installs WordPress into any of them.

Is xmlrpc.php blocked?

Yes, on a site installed by ServerMaid. xmlrpc.php is the usual target for password-guessing and amplification attacks against WordPress, and almost nothing modern needs it. Direct requests to it are refused, along with wp-config.php, readme.html, license.txt and any .git or .svn folder. If a plugin you rely on genuinely needs XML-RPC, the block is a named URL Rewrite rule (SM-WordPress-BlockSensitiveFiles) in the site's web.config that a specialist can edit for that one site.

Can plugins and themes still update with the file editor off?

Yes. Switching off the dashboard file editor (DISALLOW_FILE_EDIT) only stops editing PHP from inside WordPress. Plugin, theme and core updates use the normal update mechanism, which works because the site's application pool has modify rights on wwwroot, and WordPress minor security releases install themselves. What you choose to install remains your responsibility: wordpress.org only, kept updated, unused ones deleted.

MySQL or MariaDB for WordPress?

Either. WordPress supports both, and ServerMaid installs whichever you choose in Setup from a signed or fingerprint-verified package, bound to localhost with a secured root account.

WordPress on the Windows Server you already have

Set up the server once, then add each WordPress site from one form with permalinks, permissions, a database account and free SSL* done correctly every time. The one-click install is the WordPress module (included in every Agency licence).